[libcxx-commits] [libcxx] [libc++] Reorganize the std::variant macros (PR #89419)

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Sat Apr 20 05:05:13 PDT 2024


================
@@ -657,6 +657,8 @@ private:
 
 } // namespace __visitation
 
+#  define _LIBCPP_EAT_SEMICOLON static_assert(true, "")
----------------
mordante wrote:

In C++17 the message is optional.
```suggestion
// Adding semi-colons in macro expansions helps clang-format to do a better job.
// This macro is used to avoid compilation errors due to "stray" semi-colons.
#  define _LIBCPP_EAT_SEMICOLON static_assert(true)
```

https://github.com/llvm/llvm-project/pull/89419


More information about the libcxx-commits mailing list