summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/type_erasure/test/fail_construct_mismatch_rref.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/boost/libs/type_erasure/test/fail_construct_mismatch_rref.cpp
parentInitial commit. (diff)
downloadceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz
ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/libs/type_erasure/test/fail_construct_mismatch_rref.cpp')
-rw-r--r--src/boost/libs/type_erasure/test/fail_construct_mismatch_rref.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/boost/libs/type_erasure/test/fail_construct_mismatch_rref.cpp b/src/boost/libs/type_erasure/test/fail_construct_mismatch_rref.cpp
new file mode 100644
index 000000000..fa80fde40
--- /dev/null
+++ b/src/boost/libs/type_erasure/test/fail_construct_mismatch_rref.cpp
@@ -0,0 +1,25 @@
+// Boost.TypeErasure library
+//
+// Copyright 2012 Steven Watanabe
+//
+// Distributed under the Boost Software License Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// $Id$
+
+#include <boost/type_erasure/any.hpp>
+#include <boost/type_erasure/builtin.hpp>
+#include <boost/mpl/map.hpp>
+
+using namespace boost::type_erasure;
+namespace mpl = boost::mpl;
+
+int main()
+{
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ any<copy_constructible<>, _self&&> x(1, make_binding<mpl::map<mpl::pair<_self, char> > >());
+#else
+# error "No support for rvalue-reference is enabled. ==> Test fails (as expected) by default!"
+#endif
+}