From 49c541a7549eef84e5f046ba5d73906f27eef43d Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Tue, 4 Nov 2014 01:54:44 +0000 Subject: Add test for type properties of std::reference_wrapper llvm-svn: 221224 --- .../refwrap/type_properties.pass.cpp | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 libcxx/test/utilities/function.objects/refwrap/type_properties.pass.cpp (limited to 'libcxx/test') diff --git a/libcxx/test/utilities/function.objects/refwrap/type_properties.pass.cpp b/libcxx/test/utilities/function.objects/refwrap/type_properties.pass.cpp new file mode 100644 index 00000000000..7df692bb6f0 --- /dev/null +++ b/libcxx/test/utilities/function.objects/refwrap/type_properties.pass.cpp @@ -0,0 +1,27 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// + +// reference_wrapper + +// Test that reference wrapper meets the requirements of TriviallyCopyable, +// CopyConstructible and CopyAssignable. + +#include +#include + +int main() +{ + typedef std::reference_wrapper T; + static_assert(std::is_copy_constructible::value, ""); + static_assert(std::is_copy_assignable::value, ""); + // Extension up for standardization: See N4151. + static_assert(std::is_trivially_copyable::value, ""); +} -- cgit v1.2.3