DASH  0.3.0
type_traits.h
1 #ifndef INCLUDED_TYPE_TRAITS_DOT_H
2 #define INCLUDED_TYPE_TRAITS_DOT_H
3 
6 #if __cpp_lib_is_swappable < 201603
7 #include <type_traits>
10 namespace std {
12  template <class T>
13  static auto test(int) -> std::integral_constant<
14  bool,
15  noexcept(swap(std::declval<T&>(), std::declval<T&>()))>;
16 
17  template <class>
18  static std::false_type test(...);
19 };
20 
21 template <typename T>
22 struct is_nothrow_swappable : decltype(do_is_nothrow_swappable::test<T>(0)) {
23 };
24 } // namespace std
25 #endif
26 #endif
see https://en.cppreference.com/w/cpp/feature_test for recommended feature tests
Definition: cstddef.h:8