]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/core/test/ref_rv_fail3.cpp
2 // Test that a const rvalue can't be passed to ref()
4 // Copyright 2014 Agustin Berge
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
11 #include <boost/ref.hpp>
13 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
17 X
const crv() { return X(); }
21 boost::reference_wrapper
<X
const> r
= boost::ref( crv() ); // this should produce an ERROR
26 # error To fail, this test requires rvalue references