Use _t versions of various type traits

Available now after switching to C++14 and GCC>=4.9

Change-Id: I44e9859a6abe66db16d77b228466b65eadced8ae
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Eike Ziller
2017-01-11 17:04:23 +01:00
parent b299ff19ec
commit 63f66f28ac
5 changed files with 51 additions and 61 deletions

View File

@@ -107,7 +107,7 @@ public:
}
template<typename Type,
typename = typename std::enable_if<std::is_pointer<Type>::value>::type
typename = std::enable_if_t<std::is_pointer<Type>::value>
>
BasicSmallString(Type characterPointer)
: BasicSmallString(characterPointer, std::strlen(characterPointer))
@@ -120,15 +120,15 @@ public:
{}
template<typename Type,
typename = typename std::enable_if<
std::is_same<typename std::decay<Type>::type, std::string>::value>::type>
typename = std::enable_if_t<std::is_same<std::decay_t<Type>, std::string>::value>
>
BasicSmallString(Type &&string)
: BasicSmallString(string.data(), string.size())
{}
template<typename BeginIterator,
typename EndIterator,
typename = typename std::enable_if<std::is_same<BeginIterator, EndIterator>::value>::type
typename = std::enable_if_t<std::is_same<BeginIterator, EndIterator>::value>
>
BasicSmallString(BeginIterator begin, EndIterator end)
: BasicSmallString(&(*begin), size_type(end - begin))
@@ -560,7 +560,7 @@ unitttest_public:
}
template<typename Type,
typename = typename std::enable_if<std::is_pointer<Type>::value>::type
typename = std::enable_if_t<std::is_pointer<Type>::value>
>
friend bool operator==(const BasicSmallString& first, Type second) noexcept
{
@@ -568,7 +568,7 @@ unitttest_public:
}
template<typename Type,
typename = typename std::enable_if<std::is_pointer<Type>::value>::type
typename = std::enable_if_t<std::is_pointer<Type>::value>
>
friend bool operator==(Type first, const BasicSmallString& second) noexcept
{
@@ -620,7 +620,7 @@ unitttest_public:
}
template<typename Type,
typename = typename std::enable_if<std::is_pointer<Type>::value>::type
typename = std::enable_if_t<std::is_pointer<Type>::value>
>
friend bool operator!=(const BasicSmallString& first, Type second) noexcept
{
@@ -628,7 +628,7 @@ unitttest_public:
}
template<typename Type,
typename = typename std::enable_if<std::is_pointer<Type>::value>::type
typename = std::enable_if_t<std::is_pointer<Type>::value>
>
friend bool operator!=(Type first, const BasicSmallString& second) noexcept
{