]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/optional/test/optional_test_ref_convert_assign_const_int_prevented.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / optional / test / optional_test_ref_convert_assign_const_int_prevented.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: akrzemi1@gmail.com
10
11
12 #include "boost/optional/optional.hpp"
13
14 #ifdef BOOST_BORLANDC
15 #pragma hdrstop
16 #endif
17
18 #include "boost/core/addressof.hpp"
19 #include "boost/core/enable_if.hpp"
20 #include "boost/core/lightweight_test.hpp"
21 #include "testable_classes.hpp"
22 #include "optional_ref_assign_test_defs.hpp"
23
24 int main()
25 {
26 #ifdef BOOST_OPTIONAL_CONFIG_NO_PROPER_ASSIGN_FROM_CONST_INT
27 test_converting_assignment<const int, const int>();
28 #else
29 BOOST_STATIC_ASSERT_MSG(false, "EXPECTED TEST COMPILE-TIME FAILURE");
30 #endif
31 return boost::report_errors();
32 }