From 60c4a9be573a595ee060b58473040eef3e92c722 Mon Sep 17 00:00:00 2001 From: Ole Erik Peistorpet Date: Sun, 6 May 2018 00:29:42 +0200 Subject: [PATCH] Fixed strange compile error with VS 2017 in C++17 mode --- dynarray.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dynarray.h b/dynarray.h index 55d6ea41..a4daf8ef 100644 --- a/dynarray.h +++ b/dynarray.h @@ -439,7 +439,7 @@ class dynarray template OEL_FORCEINLINE iterator _appendImpl(size_type const count, UninitCopyFunc makeNewElems) { - _staticAssertRelocate(); + _staticAssertRelocate{}; pointer pos; if (_unusedCapacity() >= count) @@ -559,7 +559,7 @@ class dynarray void _growTo(size_type newCapacity) { - _staticAssertRelocate(); + _staticAssertRelocate{}; pointer const newData = _alloc(newCapacity); @@ -601,7 +601,7 @@ void dynarray::emplace_back(Args &&... args) template template typename dynarray::iterator dynarray::emplace(const_iterator pos, Args &&... args) { - _staticAssertRelocate(); + _staticAssertRelocate{}; auto const posPtr = const_cast(to_pointer_contiguous(pos)); OEL_BOUND_ASSERT_CHEAP(_data.get() <= posPtr && posPtr <= _end); @@ -757,7 +757,7 @@ void dynarray::reserve(size_type minCapacity) template void dynarray::shrink_to_fit() { - _staticAssertRelocate(); + _staticAssertRelocate{}; size_type const used = size(); pointer newData; @@ -798,7 +798,7 @@ inline void dynarray::pop_back() noexcept template typename dynarray::iterator dynarray::erase(iterator pos) noexcept { - _staticAssertRelocate(); + _staticAssertRelocate{}; pointer const posPtr = to_pointer_contiguous(pos); OEL_BOUND_ASSERT_CHEAP(_data.get() <= posPtr && posPtr < _end); @@ -814,7 +814,7 @@ typename dynarray::iterator dynarray::erase(iterator pos) n template typename dynarray::iterator dynarray::erase(iterator first, iterator last) noexcept { - _staticAssertRelocate(); + _staticAssertRelocate{}; pointer const pFirst = to_pointer_contiguous(first); pointer const pLast = to_pointer_contiguous(last);