mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-16 03:46:07 +00:00
[libcxx][test] Make LIBCPP_STATIC_ASSERT usable at namespace scope
... even when `!defined(_LIBCPP_VERSION)`. (Note that the previous definition for this case - `((void)0);` - is ill-formed at namespace scope.) Ditto for `LIBCPP_ASSERT`, `LIBCPP_ASSERT_NOEXCEPT`, `LIBCPP_ASSERT_NOT_NOEXCEPT`, and `LIBCPP_ONLY`. Differential Revision: https://reviews.llvm.org/D116880
This commit is contained in:
parent
eb200e584e
commit
1d3964d2ad
@ -236,11 +236,11 @@
|
|||||||
#define LIBCPP_ASSERT_NOT_NOEXCEPT(...) ASSERT_NOT_NOEXCEPT(__VA_ARGS__)
|
#define LIBCPP_ASSERT_NOT_NOEXCEPT(...) ASSERT_NOT_NOEXCEPT(__VA_ARGS__)
|
||||||
#define LIBCPP_ONLY(...) __VA_ARGS__
|
#define LIBCPP_ONLY(...) __VA_ARGS__
|
||||||
#else
|
#else
|
||||||
#define LIBCPP_ASSERT(...) ((void)0)
|
#define LIBCPP_ASSERT(...) static_assert(true, "")
|
||||||
#define LIBCPP_STATIC_ASSERT(...) ((void)0)
|
#define LIBCPP_STATIC_ASSERT(...) static_assert(true, "")
|
||||||
#define LIBCPP_ASSERT_NOEXCEPT(...) ((void)0)
|
#define LIBCPP_ASSERT_NOEXCEPT(...) static_assert(true, "")
|
||||||
#define LIBCPP_ASSERT_NOT_NOEXCEPT(...) ((void)0)
|
#define LIBCPP_ASSERT_NOT_NOEXCEPT(...) static_assert(true, "")
|
||||||
#define LIBCPP_ONLY(...) ((void)0)
|
#define LIBCPP_ONLY(...) static_assert(true, "")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
#if !defined(_LIBCPP_HAS_NO_RANGES)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user