]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/core/test/ref_implicit_fail3.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / core / test / ref_implicit_fail3.cpp
1 //
2 // Incompatible reference_wrappers must not implicitly convert to each other
3 //
4 // Copyright 2020 Peter Dimov
5 //
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
9 //
10
11 #include <boost/ref.hpp>
12
13 struct X
14 {
15 };
16
17 struct Y
18 {
19 };
20
21 void f( boost::reference_wrapper<X> )
22 {
23 }
24
25 int main()
26 {
27 Y y;
28 f( boost::ref(y) ); // should fail
29 }