File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
api/include/opentelemetry Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change 33
44#pragma once
55
6- #ifndef __has_include
7- # define OPENTELEMETRY_HAS_INCLUDE (x ) 0
8- #else
9- # define OPENTELEMETRY_HAS_INCLUDE (x ) __has_include(x)
10- #endif
6+ #include <type_traits> // IWYU pragma: keep
117
12- #if !defined(__GLIBCXX__ ) || OPENTELEMETRY_HAS_INCLUDE (< codecvt > ) // >= libstdc++-5
8+ #if !defined(__GLIBCXX__ ) || (defined(_GLIBCXX_RELEASE ) && _GLIBCXX_RELEASE >= 7 ) || \
9+ (defined(__GLIBCXX__ ) && __GLIBCXX__ >= 20150422 ) // >= libstdc++-5
1310# define OPENTELEMETRY_TRIVIALITY_TYPE_TRAITS
1411#endif
Original file line number Diff line number Diff line change @@ -142,8 +142,7 @@ using std::is_trivially_move_constructible;
142142template <typename T>
143143struct is_trivially_copy_constructible
144144{
145- static constexpr bool value =
146- std::is_copy_constructible<T>::value && __is_trivially_assignable(T &, const T &);
145+ static constexpr bool value = std::is_copy_constructible<T>::value && __has_trivial_copy(T);
147146};
148147
149148template <typename T>
@@ -155,8 +154,7 @@ struct is_trivially_move_constructible
155154template <typename T>
156155struct is_trivially_copy_assignable
157156{
158- static constexpr bool value =
159- std::is_copy_assignable<T>::value && __is_trivially_assignable(T &, const T &);
157+ static constexpr bool value = std::is_copy_assignable<T>::value && __has_trivial_assign(T);
160158};
161159
162160template <typename T>
You can’t perform that action at this time.
0 commit comments