refs #624 Use std alias traits.

This commit is contained in:
Mathew Sutcliffe
2016-03-20 21:50:41 +00:00
parent 23a7f9b719
commit a8fc899219
17 changed files with 47 additions and 47 deletions

View File

@@ -182,14 +182,14 @@ namespace BlackMisc
//! Construct a variant from a value.
template <typename T> static CVariant fromValue(T &&value)
{
static_assert(!std::is_same<CVariant, typename std::decay<T>::type>::value, "CVariant is an illegal type!");
static_assert(!std::is_same<CVariant, std::decay_t<T>>::value, "CVariant is an illegal type!");
return CVariant(QVariant::fromValue(std::forward<T>(value)));
}
//! Synonym for fromValue().
template <typename T> static CVariant from(T &&value)
{
static_assert(!std::is_same<CVariant, typename std::decay<T>::type>::value, "CVariant is an illegal type!");
static_assert(!std::is_same<CVariant, std::decay_t<T>>::value, "CVariant is an illegal type!");
return CVariant(QVariant::fromValue(std::forward<T>(value)));
}