fork download
  1. template<typename T, typename... Args>
  2. constexpr bool is_nothrow_constructible() { return noexcept(T(declval<Args>()...)); }
  3. template<typename T>
  4. constexpr bool is_nothrow_default_constructible() { return noexcept(T()); }
  5. template<typename T>
  6. constexpr bool is_nothrow_copy_constructible() { return noexcept(T(declval<T>())); }
  7. template<typename T>
  8. constexpr bool is_nothrow_move_constructible() { return noexcept(T(declval<add_rvalue_reference<T>>())); }
  9. template<typename T, typename X>
  10. constexpr bool is_nothrow_assignable() { return noexcept(declval<T>() = declval<X>()); }
  11. template<typename T, typename X>
  12. constexpr bool is_nothrow_copy_assignable() { return is_nothrow_assignable<add_lvalue_reference<T>, const add_lvalue_reference<X>>(); }
  13. template<typename T, typename X>
  14. constexpr bool is_nothrow_move_assignable() { return is_nothrow_assignable<add_lvalue_reference<T>, add_rvalue_reference<X>>(); }
  15. template<typename T>
  16. constexpr bool is_nothrow_destructible() { return noexcept(declval<T>().~T()); }
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty