]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/typeof/test/noncopyable.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / typeof / test / noncopyable.cpp
CommitLineData
7c673cae
FG
1// Copyright (C) 2006 Arkadiy Vertleyb
2// Use, modification and distribution is subject to the Boost Software
3// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
4
5#include "test.hpp"
6#include <boost/noncopyable.hpp>
7#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
8
9struct x : boost::noncopyable
10{
11 void foo() {}
12 void bar() const {}
13};
14
15BOOST_TYPEOF_REGISTER_TYPE(x)
16
17x& make_ref()
18{
19 static x result;
20 return result;
21}
22
23const x& make_const_ref()
24{
25 static x result;
26 return result;
27}
28
29void foo()
30{
31 BOOST_AUTO(& v1, make_ref());
32 v1.foo();
33
34 BOOST_AUTO(const& v2, make_const_ref());
35 v2.bar();
36}