]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/core/test/ref_rv_fail5.cpp
2 // Test that a const rvalue can't be passed to cref()
4 // Copyright 2014 Agustin Berge
5 // Copyright 2014 Peter Dimov
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
12 #include <boost/ref.hpp>
14 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
18 X
const crv() { return X(); }
22 boost::reference_wrapper
<X
const> r
= boost::cref( crv() ); // must fail
27 # error To fail, this test requires rvalue references.