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