]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/optional/test/optional_test_ref_fail_init_from_Urefref.cpp
1 // Copyright (C) 2014, 2016 andrzej Krzemienski.
3 // Use, modification, and distribution is subject to the Boost Software
4 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
7 // See http://www.boost.org/lib/optional for documentation.
9 // You are welcome to contact the author at:
12 #include "boost/optional.hpp"
13 #include "boost/core/ignore_unused.hpp"
15 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
17 // THIS TEST SHOULD FAIL TO COMPILE
19 void optional_reference__test_no_init_from_Urefref()
21 boost::optional
<const int&> opt
= long(3);
22 boost::ignore_unused(opt
);
26 # error "Test skipped. This cannot be implemented w/o rvalue references."