]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/core/test/ref_cv_test.cpp
1 // ref_cv_test.cpp: ref( x ) where x is of a cv-qualified type
3 // Copyright (c) 2017 Peter Dimov
5 // Distributed under the Boost Software License, Version 1.0.
6 // See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt
9 #include <boost/ref.hpp>
10 #include <boost/core/lightweight_test.hpp>
12 #define BOOST_TEST_REF( x ) BOOST_TEST( &boost::ref( x ).get() == &x )
13 #define BOOST_TEST_CREF( x ) BOOST_TEST( &boost::cref( x ).get() == &x )
20 int const volatile x4
= 4;
23 BOOST_TEST_CREF( x1
);
26 BOOST_TEST_CREF( x2
);
29 BOOST_TEST_CREF( x3
);
32 BOOST_TEST_CREF( x4
);
34 return boost::report_errors();