]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/contract/test/old/no_make_old_error.hpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / libs / contract / test / old / no_make_old_error.hpp
1
2 // Copyright (C) 2008-2018 Lorenzo Caminiti
3 // Distributed under the Boost Software License, Version 1.0 (see accompanying
4 // file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
5 // See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html
6
7 // Test error when make_old(...) not used by mistake.
8
9 #ifndef BOOST_CONTRACT_TEST_OLD_PTR_TYPE
10 #error "must define BOOST_CONTRACT_TEST_OLD_PTR_TYPE"
11 #endif
12
13 #include <boost/contract/old.hpp>
14
15 int main() {
16 int x = 1;
17 BOOST_CONTRACT_TEST_OLD_PTR_TYPE<int> old_x = boost::contract::copy_old() ?
18 x : boost::contract::null_old(); // Error (missing make_old(...)).
19 return 0;
20 }
21