• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 #ifndef BOOST_CONTRACT_DETAIL_INLINED_OLD_HPP_
3 #define BOOST_CONTRACT_DETAIL_INLINED_OLD_HPP_
4 
5 // Copyright (C) 2008-2018 Lorenzo Caminiti
6 // Distributed under the Boost Software License, Version 1.0 (see accompanying
7 // file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
8 // See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html
9 
10 // IMPORTANT: Do NOT use config macros BOOST_CONTRACT_... in this file so lib
11 // .cpp does not need recompiling if config changes (recompile only user code).
12 
13 #include <boost/contract/old.hpp>
14 #include <boost/contract/detail/declspec.hpp>
15 
16 namespace boost { namespace contract {
17 
18 BOOST_CONTRACT_DETAIL_DECLINLINE
null_old()19 old_value null_old() { return old_value(); }
20 
21 BOOST_CONTRACT_DETAIL_DECLINLINE
make_old(old_value const & old)22 old_pointer make_old(old_value const& old) {
23     return old_pointer(0, old);
24 }
25 
26 BOOST_CONTRACT_DETAIL_DECLINLINE
make_old(virtual_ * v,old_value const & old)27 old_pointer make_old(virtual_* v, old_value const& old) {
28     return old_pointer(v, old);
29 }
30 
31 } } // namespacd
32 
33 #endif // #include guard
34 
35