mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
Update C++26 deprecated constructs to ensure future standard compliance (#1267)
* Update C++26 deprecated constructs to ensure future standard compliance I replaced std::is_trivial with a combination of std::is_trivially_default_constructible and std::is_trivially_copyable. Additionally, I added the required comma before the ellipsis in variadic functions to match updated language specifications. * Some additional is_trivial related changes not found directly when compiling tests in C++26 --------- Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
This commit is contained in:
parent
a843650649
commit
dbaffa9169
@ -1227,11 +1227,11 @@ typedef integral_constant<bool, true> true_type;
|
||||
/// is_pod
|
||||
///\ingroup type_traits
|
||||
template <typename T>
|
||||
struct is_pod : std::integral_constant<bool, std::is_standard_layout<T>::value && std::is_trivial<T>::value> {};
|
||||
struct is_pod : std::integral_constant<bool, std::is_standard_layout<T>::value && std::is_trivially_default_constructible<T>::value && std::is_trivially_copyable<T>::value> {};
|
||||
|
||||
#if ETL_USING_CPP17
|
||||
template <typename T>
|
||||
inline constexpr bool is_pod_v = std::is_standard_layout_v<T> && std::is_trivial_v<T>;
|
||||
inline constexpr bool is_pod_v = std::is_standard_layout_v<T> && std::is_trivially_default_constructible_v<T> && std::is_trivially_copyable_v<T>;
|
||||
#endif
|
||||
|
||||
#if defined(ETL_COMPILER_GCC)
|
||||
|
||||
@ -1215,11 +1215,11 @@ typedef integral_constant<bool, true> true_type;
|
||||
/// is_pod
|
||||
///\ingroup type_traits
|
||||
template <typename T>
|
||||
struct is_pod : std::integral_constant<bool, std::is_standard_layout<T>::value && std::is_trivial<T>::value> {};
|
||||
struct is_pod : std::integral_constant<bool, std::is_standard_layout<T>::value && std::is_trivially_default_constructible<T>::value && std::is_trivially_copyable<T>::value> {};
|
||||
|
||||
#if ETL_USING_CPP17
|
||||
template <typename T>
|
||||
inline constexpr bool is_pod_v = std::is_standard_layout_v<T> && std::is_trivial_v<T>;
|
||||
inline constexpr bool is_pod_v = std::is_standard_layout_v<T> && std::is_trivially_default_constructible_v<T> && std::is_trivially_copyable_v<T>;
|
||||
#endif
|
||||
|
||||
#if defined(ETL_COMPILER_GCC)
|
||||
|
||||
@ -39,7 +39,7 @@ namespace
|
||||
{
|
||||
}
|
||||
|
||||
SuccessorBase(SuccessorBase& successors...)
|
||||
SuccessorBase(SuccessorBase& successors, ...)
|
||||
: successor(successors)
|
||||
{
|
||||
}
|
||||
@ -55,7 +55,7 @@ namespace
|
||||
{
|
||||
}
|
||||
|
||||
SuccessorSameBase1(SuccessorBase& successors...)
|
||||
SuccessorSameBase1(SuccessorBase& successors, ...)
|
||||
: SuccessorBase(successors)
|
||||
, value(0)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user