mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-22 16:37:40 +08:00
[libcxx] Update test of trivial copyability of reference_wrapper
N4151 is not an extension anymore, it was standardized in C++14. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@347263 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
// reference_wrapper
|
// reference_wrapper
|
||||||
|
|
||||||
// Test that reference wrapper meets the requirements of TriviallyCopyable,
|
// Test that reference wrapper meets the requirements of CopyConstructible and
|
||||||
// CopyConstructible and CopyAssignable.
|
// CopyAssignable, and TriviallyCopyable (starting in C++14).
|
||||||
|
|
||||||
// Test fails due to use of is_trivially_* trait.
|
// Test fails due to use of is_trivially_* trait.
|
||||||
// XFAIL: gcc-4.9
|
// XFAIL: gcc-4.9
|
||||||
@@ -48,8 +48,9 @@ void test()
|
|||||||
typedef std::reference_wrapper<T> Wrap;
|
typedef std::reference_wrapper<T> Wrap;
|
||||||
static_assert(std::is_copy_constructible<Wrap>::value, "");
|
static_assert(std::is_copy_constructible<Wrap>::value, "");
|
||||||
static_assert(std::is_copy_assignable<Wrap>::value, "");
|
static_assert(std::is_copy_assignable<Wrap>::value, "");
|
||||||
// Extension up for standardization: See N4151.
|
#if TEST_STD_VER >= 14
|
||||||
static_assert(std::is_trivially_copyable<Wrap>::value, "");
|
static_assert(std::is_trivially_copyable<Wrap>::value, "");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
Reference in New Issue
Block a user