Fixed compiler warning.

This is already fixed upstream in commit r2174:
"Fixed compiler warnings in asGetTypeTraits on gnuc 5.1"
This commit is contained in:
deve 2015-08-06 14:35:26 +02:00
parent 5458792b79
commit b5c15275de

View File

@ -584,8 +584,8 @@ BEGIN_AS_NAMESPACE
template<typename T>
asUINT asGetTypeTraits()
{
#if defined(_MSC_VER) || defined(_LIBCPP_TYPE_TRAITS)
// MSVC & XCode/Clang
#if defined(_MSC_VER) || defined(_LIBCPP_TYPE_TRAITS) || (__GNUC__ >= 5)
// MSVC & XCode/Clang, and gnuc 5+
// C++11 compliant code
bool hasConstructor = std::is_default_constructible<T>::value && !std::is_trivially_default_constructible<T>::value;
bool hasDestructor = std::is_destructible<T>::value && !std::is_trivially_destructible<T>::value;