@@ -312,7 +312,7 @@ void DecodeArgument(_Inout_ A& args, _In_ const std::byte* __restrict const buff
312
312
args << arg;
313
313
}
314
314
} else {
315
- static_assert_no_clang ( false , " Unknown argument type" );
315
+ static_assert ( sizeof (A) == 0 , " Unknown argument type" );
316
316
}
317
317
318
318
position += kTypeSize <T> + padding;
@@ -341,10 +341,10 @@ void DecodeArgument(_Inout_ A& args, _In_ const std::byte* __restrict const buff
341
341
} else if constexpr (std::is_same_v<B, wchar_t >) {
342
342
args + EncodeUtf8 (str, length);
343
343
} else {
344
- static_assert_no_clang ( false , " Unknown string type" );
344
+ static_assert ( sizeof (B) == 0 , " Unknown string type" );
345
345
}
346
346
} else {
347
- static_assert_no_clang ( false , " Unknown argument type" );
347
+ static_assert ( sizeof (A) , " Unknown argument type" );
348
348
}
349
349
position += kTypeSize <T> + padding + length * static_cast <Align>(sizeof (B)) + static_cast <Align>(sizeof (B));
350
350
}
@@ -369,7 +369,7 @@ void DecodeArgument(_Inout_ A& args, _In_ const std::byte* __restrict const buff
369
369
} else if constexpr (std::is_same_v<A, LogFormatArgs>) {
370
370
args << arg;
371
371
} else {
372
- static_assert_no_clang ( false , " Unknown argument type" );
372
+ static_assert ( sizeof (A) == 0 , " Unknown argument type" );
373
373
}
374
374
375
375
position += kTypeSize <SID> + padding + size;
@@ -394,7 +394,7 @@ void DecodeArgument(_Inout_ A& args, _Inout_ const std::byte* __restrict const b
394
394
} else if constexpr (std::is_same_v<A, LogFormatArgs>) {
395
395
pFunctionTable->addFormatArgs (args, &buffer[position + kArgSize + padding]);
396
396
} else {
397
- static_assert_no_clang ( false , " Unknown argument type" );
397
+ static_assert ( sizeof (A) == 0 , " Unknown argument type" );
398
398
}
399
399
position += kArgSize + padding + pFunctionTable->size ;
400
400
}
@@ -783,13 +783,13 @@ LogDataBase::~LogDataBase() noexcept {
783
783
// ensure proper memory layout
784
784
static_assert (sizeof (LogDataBase) == M3C_LOGDATA_SIZE, " size of LogLine" );
785
785
786
- static_assert_no_clang (offsetof (LogDataBase, m_stackBuffer) == 0 , " offset of m_stackBuffer" );
786
+ static_assert (offsetof (LogDataBase, m_stackBuffer) == 0 , " offset of m_stackBuffer" );
787
787
#if UINTPTR_MAX == UINT64_MAX
788
- static_assert_no_clang (offsetof (LogDataBase, m_used) == M3C_LOGDATA_SIZE - 4 , " offset of m_used" );
788
+ static_assert (offsetof (LogDataBase, m_used) == M3C_LOGDATA_SIZE - 4 , " offset of m_used" );
789
789
#elif UINTPTR_MAX == UINT32_MAX
790
- static_assert_no_clang (offsetof (LogDataBase, m_used) == M3C_LOGDATA_SIZE - 4 , " offset of m_used" );
790
+ static_assert (offsetof (LogDataBase, m_used) == M3C_LOGDATA_SIZE - 4 , " offset of m_used" );
791
791
#else
792
- static_assert_no_clang (false , " layout assertions not defined" );
792
+ static_assert (false , " layout assertions not defined" );
793
793
#endif
794
794
if ((!m_hasHeapBuffer || GetHeapBuffer ().use_count () == 1 ) && m_hasNonTriviallyCopyable) {
795
795
[[unlikely]];
0 commit comments