diff --git a/api/include/opentelemetry/nostd/type_traits.h b/api/include/opentelemetry/nostd/type_traits.h index 3a64b5db1a..601d11b351 100644 --- a/api/include/opentelemetry/nostd/type_traits.h +++ b/api/include/opentelemetry/nostd/type_traits.h @@ -142,7 +142,8 @@ using std::is_trivially_move_constructible; template struct is_trivially_copy_constructible { - static constexpr bool value = std::is_copy_constructible::value && __has_trivial_copy(T); + static constexpr bool value = std::is_copy_constructible::value + && __is_trivially_assignable(T&, const T&); }; template @@ -154,7 +155,8 @@ struct is_trivially_move_constructible template struct is_trivially_copy_assignable { - static constexpr bool value = std::is_copy_assignable::value && __has_trivial_assign(T); + static constexpr bool value = std::is_copy_assignable::value + && __is_trivially_assignable(T&, const T&); }; template