Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 08:44:22

0001 /*
0002  * Distributed under the Boost Software License, Version 1.0.
0003  * (See accompanying file LICENSE_1_0.txt or copy at
0004  * https://www.boost.org/LICENSE_1_0.txt)
0005  *
0006  * Copyright (c) 2022 Andrey Semashev
0007  */
0008 /*!
0009  * \file scope/unique_resource_fwd.hpp
0010  *
0011  * This header contains forward declaration of \c unique_resource template.
0012  */
0013 
0014 #ifndef BOOST_SCOPE_UNIQUE_RESOURCE_FWD_HPP_INCLUDED_
0015 #define BOOST_SCOPE_UNIQUE_RESOURCE_FWD_HPP_INCLUDED_
0016 
0017 #include <type_traits>
0018 #include <boost/scope/detail/config.hpp>
0019 #include <boost/scope/detail/move_or_copy_construct_ref.hpp>
0020 #include <boost/scope/detail/type_traits/conjunction.hpp>
0021 #include <boost/scope/detail/header.hpp>
0022 
0023 #ifdef BOOST_HAS_PRAGMA_ONCE
0024 #pragma once
0025 #endif
0026 
0027 namespace boost {
0028 namespace scope {
0029 
0030 template< typename Resource, typename Deleter, typename Traits = void >
0031 class unique_resource;
0032 
0033 template< typename Resource, typename Deleter, typename Invalid = typename std::decay< Resource >::type >
0034 unique_resource< typename std::decay< Resource >::type, typename std::decay< Deleter >::type >
0035 make_unique_resource_checked(Resource&& res, Invalid const& invalid, Deleter&& del)
0036     noexcept(BOOST_SCOPE_DETAIL_DOC_HIDDEN(detail::conjunction<
0037         std::is_nothrow_constructible< typename std::decay< Resource >::type, typename detail::move_or_copy_construct_ref< Resource, typename std::decay< Resource >::type >::type >,
0038         std::is_nothrow_constructible< typename std::decay< Deleter >::type, typename detail::move_or_copy_construct_ref< Deleter, typename std::decay< Deleter >::type >::type >
0039     >::value));
0040 
0041 } // namespace scope
0042 } // namespace boost
0043 
0044 #include <boost/scope/detail/footer.hpp>
0045 
0046 #endif // BOOST_SCOPE_UNIQUE_RESOURCE_FWD_HPP_INCLUDED_