diff options
author | Eric Fiselier <eric@efcs.ca> | 2014-11-04 01:54:44 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2014-11-04 01:54:44 +0000 |
commit | 49c541a7549eef84e5f046ba5d73906f27eef43d (patch) | |
tree | 5e7b256bc77f17685b59cf5fc01d6ba2bc953092 /libcxx/test/utilities/function.objects | |
parent | 2e25042a937e0e2762c8ef35a3a30ec8f9930406 (diff) | |
download | bcm5719-llvm-49c541a7549eef84e5f046ba5d73906f27eef43d.tar.gz bcm5719-llvm-49c541a7549eef84e5f046ba5d73906f27eef43d.zip |
Add test for type properties of std::reference_wrapper
llvm-svn: 221224
Diffstat (limited to 'libcxx/test/utilities/function.objects')
-rw-r--r-- | libcxx/test/utilities/function.objects/refwrap/type_properties.pass.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
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. +// +//===----------------------------------------------------------------------===// + +// <functional> + +// reference_wrapper + +// Test that reference wrapper meets the requirements of TriviallyCopyable, +// CopyConstructible and CopyAssignable. + +#include <functional> +#include <type_traits> + +int main() +{ + typedef std::reference_wrapper<int> T; + static_assert(std::is_copy_constructible<T>::value, ""); + static_assert(std::is_copy_assignable<T>::value, ""); + // Extension up for standardization: See N4151. + static_assert(std::is_trivially_copyable<T>::value, ""); +} |