Skip to content

Commit ad21e5c

Browse files
committed
Fix type_traits.h to address compiler warnings around using deprecated methods
Signed-off-by: Rohit Agrawal <[email protected]>
1 parent 7801cd9 commit ad21e5c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

api/include/opentelemetry/nostd/type_traits.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ using std::is_trivially_move_constructible;
142142
template <typename T>
143143
struct is_trivially_copy_constructible
144144
{
145-
static constexpr bool value = std::is_copy_constructible<T>::value && __has_trivial_copy(T);
145+
static constexpr bool value = std::is_copy_constructible<T>::value
146+
&& __is_trivially_assignable(T&, const T&);
146147
};
147148

148149
template <typename T>
@@ -154,7 +155,8 @@ struct is_trivially_move_constructible
154155
template <typename T>
155156
struct is_trivially_copy_assignable
156157
{
157-
static constexpr bool value = std::is_copy_assignable<T>::value && __has_trivial_assign(T);
158+
static constexpr bool value = std::is_copy_assignable<T>::value
159+
&& __is_trivially_assignable(T&, const T&);
158160
};
159161

160162
template <typename T>

0 commit comments

Comments
 (0)