1717# include " opentelemetry/config.h"
1818# include " opentelemetry/nostd/detail/void.h" // IWYU pragma: export
1919# include " opentelemetry/version.h"
20+ #endif
2021
2122OPENTELEMETRY_BEGIN_NAMESPACE
2223namespace nostd
@@ -70,6 +71,10 @@ struct remove_all_extents<std::array<T, N>> : remove_all_extents<T>
7071template <typename T>
7172using remove_all_extents_t = typename remove_all_extents<T>::type;
7273
74+ #if defined(OPENTELEMETRY_STL_VERSION) && OPENTELEMETRY_STL_VERSION >= 2017
75+ using std::is_nothrow_swappable;
76+ using std::is_swappable;
77+ #else
7378/* *
7479 * Back port of std::is_swappable
7580 */
@@ -119,6 +124,7 @@ struct is_nothrow_swappable<false, T> : std::false_type
119124} // namespace detail
120125template <typename T>
121126using is_nothrow_swappable = detail::swappable::is_nothrow_swappable<is_swappable<T>::value, T>;
127+ #endif
122128
123129/* *
124130 * Back port of
@@ -127,12 +133,12 @@ using is_nothrow_swappable = detail::swappable::is_nothrow_swappable<is_swappabl
127133 * std::is_trivialy_copy_assignable
128134 * std::is_trivialy_move_assignable
129135 */
130- # ifdef OPENTELEMETRY_TRIVIALITY_TYPE_TRAITS
136+ #ifdef OPENTELEMETRY_TRIVIALITY_TYPE_TRAITS
131137using std::is_trivially_copy_assignable;
132138using std::is_trivially_copy_constructible;
133139using std::is_trivially_move_assignable;
134140using std::is_trivially_move_constructible;
135- # else
141+ #else
136142template <typename T>
137143struct is_trivially_copy_constructible
138144{
@@ -156,7 +162,6 @@ struct is_trivially_move_assignable
156162{
157163 static constexpr bool value = __is_trivial(T);
158164};
159- # endif
165+ #endif
160166} // namespace nostd
161167OPENTELEMETRY_END_NAMESPACE
162- #endif /* OPENTELEMETRY_HAVE_STD_TYPE_TRAITS */
0 commit comments