std::is_pod is deprecated in C++20 (#241)

This commit is contained in:
raitraak-rrk 2020-07-20 18:09:54 +10:00 committed by GitHub
parent 2cf00a0ba4
commit 14d7b300b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1063,11 +1063,12 @@ namespace etl
//***************************************************************************
/// is_pod
///\ingroup type_traits
template <typename T> struct is_pod : std::is_pod<T> {};
template <typename T>
struct is_pod : std::integral_constant<bool, std::is_standard_layout<T>::value && std::is_trivial<T>::value> {};
#if ETL_CPP17_SUPPORTED
template <typename T>
inline constexpr bool is_pod_v = std::is_pod_v<T>;
inline constexpr bool is_pod_v = std::is_standard_layout_v<T> && std::is_trivial_v<T>;
#endif
#if !defined(ARDUINO) && ETL_NOT_USING_STLPORT