]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/optional/test/optional_xconfig_NO_LEGAL_CONVERT_FROM_REF_pass.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / optional / test / optional_xconfig_NO_LEGAL_CONVERT_FROM_REF_pass.cpp
1 // Copyright (C) 2015 Andrzej Krzemienski.
2 //
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)
6 //
7 // See http://www.boost.org/lib/optional for documentation.
8 //
9 // You are welcome to contact the author at:
10 // akrzemi1@gmail.com
11
12 #include "boost/core/ignore_unused.hpp"
13 #include "boost/core/lightweight_test.hpp"
14 #include "boost/optional/detail/optional_config.hpp"
15
16 #if (defined BOOST_NO_CXX11_RVALUE_REFERENCES) || (defined BOOST_OPTIONAL_CONFIG_NO_LEGAL_CONVERT_FROM_REF)
17
18 int main() { return 0; }
19
20 #else
21
22 struct S {};
23
24 struct Binder
25 {
26 S& ref_;
27 template <typename R> Binder (R&&r) : ref_(r) {}
28 };
29
30 int main()
31 {
32 S s ;
33 Binder b = s;
34 boost::ignore_unused(b);
35 return 0;
36 }
37
38 #endif