[PATCH] D21871: [libcxx] [test] Make vector.bool/construct_default.pass.cpp more portable.
Stephan T. Lavavej via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 29 16:25:11 PDT 2016
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.
Make vector.bool/construct_default.pass.cpp more portable.
vector<bool>'s default ctor and allocator ctor aren't depicted as noexcept in the Working Paper. We're already directly including test_macros.h, so use LIBCPP_STATIC_ASSERT.
http://reviews.llvm.org/D21871
Files:
test/std/containers/sequences/vector.bool/construct_default.pass.cpp
Index: test/std/containers/sequences/vector.bool/construct_default.pass.cpp
===================================================================
--- test/std/containers/sequences/vector.bool/construct_default.pass.cpp
+++ test/std/containers/sequences/vector.bool/construct_default.pass.cpp
@@ -24,7 +24,7 @@
test0()
{
#if TEST_STD_VER > 14
- static_assert((noexcept(C{})), "" );
+ LIBCPP_STATIC_ASSERT((noexcept(C{})), "" );
#elif TEST_STD_VER >= 11
static_assert((noexcept(C()) == noexcept(typename C::allocator_type())), "" );
#endif
@@ -45,7 +45,7 @@
test1(const typename C::allocator_type& a)
{
#if TEST_STD_VER > 14
- static_assert((noexcept(C{typename C::allocator_type{}})), "" );
+ LIBCPP_STATIC_ASSERT((noexcept(C{typename C::allocator_type{}})), "" );
#elif TEST_STD_VER >= 11
static_assert((noexcept(C(typename C::allocator_type())) == std::is_nothrow_copy_constructible<typename C::allocator_type>::value), "" );
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21871.62303.patch
Type: text/x-patch
Size: 946 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160629/279709ed/attachment.bin>
More information about the cfe-commits
mailing list