Range-v3
Range algorithms, views, and actions for the Standard Library
scope.hpp File Reference

Classes

class  ranges::v3::basic_scope_exit< EF, Policy >
 
class  ranges::v3::basic_scope_exit< EF, Policy >
 
struct  ranges::v3::detail::_box< T >
 
struct  ranges::v3::detail::_coerce_ref_fn< T >
 
struct  ranges::v3::detail::on_exit_policy
 
class  ranges::v3::unique_resource< R, D >
 
class  ranges::v3::unique_resource< R &, D >
 

Namespaces

 ranges::v3
 Protect a callable so that it can be safely used in a bind expression without accidentally becoming a "nested" bind.
 

Typedefs

template<typename T , typename U >
using ranges::v3::detail::_coerce_to_ref_of_t = decltype(_coerce_ref_fn< U >{}(std::declval< T >()))
 
template<typename T , typename TT >
using ranges::v3::detail::_is_constructible = typename std::conditional< std::is_reference< TT >::value||!std::is_nothrow_move_constructible< TT >::value, std::is_constructible< T, TT const & >, std::is_constructible< T, TT >>::type
 
template<typename T >
using ranges::v3::detail::_is_nothrow_movable = meta::bool_< std::is_nothrow_move_constructible< T >::value &&std::is_nothrow_move_assignable< T >::value >
 

Functions

template<class Policy , class EF >
basic_scope_exit< std::decay_t< EF >, Policyranges::v3::detail::_make_guard (EF &&ef)
 
template<typename T >
constexpr meta::if_c< (!std::is_nothrow_move_assignable< T >::value &&std::is_copy_assignable< T >::value), T const &, T && > ranges::v3::detail::_move_assign_if_noexcept (T &x) noexcept
 
template<class EF >
basic_scope_exit< std::decay_t< EF >, detail::on_exit_policy > ranges::v3::make_scope_exit (EF &&ef) noexcept(std::is_nothrow_constructible< std::decay_t< EF >, EF >::value)
 
template<typename R , typename D >
unique_resource< std::decay_t< R >, std::decay_t< D > > ranges::v3::make_unique_resource (R &&r, D &&d) noexcept(std::is_nothrow_constructible< std::decay_t< R >, R >::value && std::is_nothrow_constructible< std::decay_t< D >, D >::value)
 
template<typename R , typename D >
unique_resource< R &, std::decay_t< D > > ranges::v3::make_unique_resource (std::reference_wrapper< R > r, D &&d) noexcept(std::is_nothrow_constructible< std::decay_t< D >, D >::value)
 
template<typename R , typename D , typename S >
unique_resource< std::decay_t< R >, std::decay_t< D > > ranges::v3::make_unique_resource_checked (R &&r, S const &invalid, D &&d) noexcept(std::is_nothrow_constructible< std::decay_t< R >, R >::value && std::is_nothrow_constructible< std::decay_t< D >, D >::value/*&& std::is_nothrow_move_constructible< std::decay_t< R >>::value */)
 
template<class EF , class Policy >
void ranges::v3::swap (basic_scope_exit< EF, Policy > &, basic_scope_exit< EF, Policy > &)=delete
 
template<typename R , typename D >
void ranges::v3::swap (unique_resource< R, D > &lhs, unique_resource< R, D > &rhs) noexcept(detail::_is_nothrow_movable< R >::value &&detail::_is_nothrow_movable< D >::value)