#ifndef BOOST_CONTRACT_DETAIL_OPTIONAL_HPP_ #define BOOST_CONTRACT_DETAIL_OPTIONAL_HPP_ // Copyright (C) 2008-2018 Lorenzo Caminiti // Distributed under the Boost Software License, Version 1.0 (see accompanying // file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt). // See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html #include #include #include namespace boost { namespace contract { namespace detail { template struct is_optional : boost::false_type {}; template struct is_optional > : boost::true_type {}; template struct optional_value_type { typedef T type; }; template struct optional_value_type > { typedef T type; }; template struct remove_value_reference_if_optional { typedef T type; }; template struct remove_value_reference_if_optional > { typedef typename boost::remove_reference::type type; }; template T& optional_get(T& x) { return x; } template T& optional_get(boost::optional& x) { return x.get(); } template T& optional_get(boost::optional& x) { return x.get(); } } } } // namespace #endif // #include guard