]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/core/test/ref_rv_fail1.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / core / test / ref_rv_fail1.cpp
1 //
2 // Test that a reference_wrapper can't be constructed from an rvalue
3 //
4 // Copyright 2014 Agustin Berge
5 //
6 // Distributed under the Boost Software License, Version 1.0.
7 // See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt
9 //
10
11 #include <boost/ref.hpp>
12
13 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
14
15 int main()
16 {
17 boost::reference_wrapper<int const> r( 1 ); // this should produce an ERROR
18 (void)r;
19 }
20
21 #else
22 # error To fail, this test requires rvalue references
23 #endif