old.hpp 1018 B

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