diff --git a/fwd.h b/fwd.h index a1e10e3c..ca7dd052 100644 --- a/fwd.h +++ b/fwd.h @@ -38,14 +38,14 @@ #endif +//! Used for checking preconditions. Can be defined to your own +/** +* Used in noexcept functions, so don't expect to catch anything thrown. +* OEL_ASSERT itself should probably be noexcept to avoid bloat. */ #if OEL_MEM_BOUND_DEBUG_LVL == 0 #undef OEL_ASSERT #define OEL_ASSERT(cond) void(0) #elif !defined OEL_ASSERT - //! Used for checking preconditions. Can be defined to your own - /** - * Used in noexcept functions, so don't expect to catch anything thrown. - * OEL_ASSERT itself should probably be noexcept to avoid bloat. */ #if defined _MSC_VER #define OEL_ASSERT(cond) ((cond) or (__debugbreak(), false)) #else diff --git a/unit_test/dynarray_mutate_gtest.cpp b/unit_test/dynarray_mutate_gtest.cpp index 80ba8ed5..fff3ef36 100644 --- a/unit_test/dynarray_mutate_gtest.cpp +++ b/unit_test/dynarray_mutate_gtest.cpp @@ -886,8 +886,10 @@ TEST_F(dynarrayTest, shrinkToFit) TEST_F(dynarrayTest, overAligned) { constexpr auto testAlignment = OEL_MALLOC_ALIGNMENT * 2; - struct alignas(testAlignment) Type {}; - + struct alignas(testAlignment) Type + { + double v[2]; + }; dynarray special(oel::reserve, 1); special.insert(special.begin(), Type());