Fix clang-15 warnings

This commit is contained in:
greg7mdp
2022-11-19 14:25:19 -05:00
parent ab663358bc
commit d676385fb4
4 changed files with 13 additions and 69 deletions
+4 -26
View File
@@ -223,29 +223,6 @@ struct disjunction<> : std::false_type {};
template <typename T>
struct negation : std::integral_constant<bool, !T::value> {};
template <typename T>
struct is_trivially_destructible
: std::integral_constant<bool, __has_trivial_destructor(T) &&
std::is_destructible<T>::value> {};
template <typename T>
struct is_trivially_default_constructible
: std::integral_constant<bool, __has_trivial_constructor(T) &&
std::is_default_constructible<T>::value &&
is_trivially_destructible<T>::value> {};
template <typename T>
struct is_trivially_copy_constructible
: std::integral_constant<bool, __has_trivial_copy(T) &&
std::is_copy_constructible<T>::value &&
is_trivially_destructible<T>::value> {};
template <typename T>
struct is_trivially_copy_assignable
: std::integral_constant<
bool, __has_trivial_assign(typename std::remove_reference<T>::type) &&
phmap::is_copy_assignable<T>::value> {};
// -----------------------------------------------------------------------------
// C++14 "_t" trait aliases
// -----------------------------------------------------------------------------
@@ -1808,9 +1785,10 @@ protected:
// Also, we should be checking is_trivially_copyable here, which is not
// supported now, so we use is_trivially_* traits instead.
template <typename T,
bool unused = phmap::is_trivially_copy_constructible<T>::value&&
phmap::is_trivially_copy_assignable<typename std::remove_cv<
T>::type>::value&& std::is_trivially_destructible<T>::value>
bool unused =
std::is_trivially_copy_constructible<T>::value &&
std::is_trivially_copy_assignable<typename std::remove_cv<T>::type>::value &&
std::is_trivially_destructible<T>::value>
class optional_data;
// Trivially copyable types