mirror of
https://github.com/matrix-construct/construct
synced 2024-12-23 22:13:55 +01:00
ircd::util: Add is_pod wrapper; fix deprecation warning.
This commit is contained in:
parent
bcbcfba6e8
commit
7f2ac27cc5
2 changed files with 9 additions and 2 deletions
|
@ -240,6 +240,13 @@ is_integer()
|
|||
return is_number<T>() && !is_floating<T>();
|
||||
}
|
||||
|
||||
template<class T>
|
||||
constexpr bool
|
||||
is_pod()
|
||||
{
|
||||
return std::is_standard_layout<T>::value && std::is_trivial<T>::value;
|
||||
}
|
||||
|
||||
//
|
||||
// Convenience constexprs for iterators
|
||||
//
|
||||
|
|
|
@ -129,7 +129,7 @@ noexcept
|
|||
}
|
||||
|
||||
template<class T>
|
||||
constexpr typename std::enable_if<std::is_pod<T>::value, const uint8_t *>::type
|
||||
constexpr typename std::enable_if<is_pod<T>(), const uint8_t *>::type
|
||||
data(const T &val)
|
||||
noexcept
|
||||
{
|
||||
|
@ -137,7 +137,7 @@ noexcept
|
|||
}
|
||||
|
||||
template<class T>
|
||||
constexpr typename std::enable_if<std::is_pod<T>::value, uint8_t *>::type
|
||||
constexpr typename std::enable_if<is_pod<T>(), uint8_t *>::type
|
||||
data(T &val)
|
||||
noexcept
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue