1818
1919# include " opentelemetry/config.h"
2020# include " opentelemetry/nostd/detail/void.h" // IWYU pragma: export
21+ #endif
2122
2223OPENTELEMETRY_BEGIN_NAMESPACE
2324namespace nostd
@@ -71,6 +72,10 @@ struct remove_all_extents<std::array<T, N>> : remove_all_extents<T>
7172template <typename T>
7273using remove_all_extents_t = typename remove_all_extents<T>::type;
7374
75+ #if defined(OPENTELEMETRY_STL_VERSION) && OPENTELEMETRY_STL_VERSION >= 2017
76+ using std::is_nothrow_swappable;
77+ using std::is_swappable;
78+ #else
7479/* *
7580 * Back port of std::is_swappable
7681 */
@@ -120,6 +125,7 @@ struct is_nothrow_swappable<false, T> : std::false_type
120125} // namespace detail
121126template <typename T>
122127using is_nothrow_swappable = detail::swappable::is_nothrow_swappable<is_swappable<T>::value, T>;
128+ #endif
123129
124130/* *
125131 * Back port of
@@ -128,12 +134,12 @@ using is_nothrow_swappable = detail::swappable::is_nothrow_swappable<is_swappabl
128134 * std::is_trivialy_copy_assignable
129135 * std::is_trivialy_move_assignable
130136 */
131- # ifdef OPENTELEMETRY_TRIVIALITY_TYPE_TRAITS
137+ #ifdef OPENTELEMETRY_TRIVIALITY_TYPE_TRAITS
132138using std::is_trivially_copy_assignable;
133139using std::is_trivially_copy_constructible;
134140using std::is_trivially_move_assignable;
135141using std::is_trivially_move_constructible;
136- # else
142+ #else
137143template <typename T>
138144struct is_trivially_copy_constructible
139145{
@@ -157,7 +163,6 @@ struct is_trivially_move_assignable
157163{
158164 static constexpr bool value = __is_trivial(T);
159165};
160- # endif
166+ #endif
161167} // namespace nostd
162168OPENTELEMETRY_END_NAMESPACE
163- #endif /* OPENTELEMETRY_HAVE_STD_TYPE_TRAITS */
0 commit comments