Simplify type traits

This commit is contained in:
Stephan van Veen 2019-05-09 18:24:30 +02:00
parent df21d07bd6
commit 2dc9121acf

View File

@ -126,8 +126,8 @@ public:
// Entry point for template types other than std::vector and std::list // Entry point for template types other than std::vector and std::list
template <typename T> template <typename T>
typename std::enable_if<is_specialization<T, std::vector>::value == false && typename std::enable_if<!is_specialization<T, std::vector>::value &&
is_specialization<T, std::list>::value == false, bool>::type !is_specialization<T, std::list>::value, bool>::type
operator==(const T& aRhs) const { operator==(const T& aRhs) const {
return get<T>() == aRhs; return get<T>() == aRhs;
} }
@ -354,8 +354,8 @@ class ArgumentParser {
// Getter enabled for all template types other than std::vector and std::list // Getter enabled for all template types other than std::vector and std::list
template <typename T = std::string> template <typename T = std::string>
typename std::enable_if<is_specialization<T, std::vector>::value == false && typename std::enable_if<!is_specialization<T, std::vector>::value &&
is_specialization<T, std::list>::value == false, T>::type !is_specialization<T, std::list>::value, T>::type
get(const char * aArgumentName) { get(const char * aArgumentName) {
auto tIterator = mArgumentMap.find(aArgumentName); auto tIterator = mArgumentMap.find(aArgumentName);
if (tIterator != mArgumentMap.end()) { if (tIterator != mArgumentMap.end()) {