Bläddra i källkod

Helper function implemented.

main
offa 7 år sedan
förälder
incheckning
831c97cc89
1 ändrade filer med 12 tillägg och 0 borttagningar
  1. +12
    -0
      include/unique_resource.h

+ 12
- 0
include/unique_resource.h Visa fil

constexpr auto is_nothrow_move_or_copy_constructible_from_v = is_ntmocp_constructible<T, TT>::value; constexpr auto is_nothrow_move_or_copy_constructible_from_v = is_ntmocp_constructible<T, TT>::value;




template<class T,
class U = std::conditional_t<(!std::is_nothrow_move_assignable<T>::value
&& std::is_copy_assignable<T>::value),
T const &,
T &&>>
constexpr U move_assign_if_noexcept(T&& value) noexcept
{
return std::move(value);
}



template<class R, class D> template<class R, class D>
class unique_resource class unique_resource
{ {

Laddar…
Avbryt
Spara