HeliumProject / Engine

C++ Game Engine (Under Construction!)
http://heliumproject.org/
Other
441 stars 70 forks source link

Errors with GCC 4.8: "error: ‘has_trivial_destructor’ is not a member of ‘std’" #53

Closed ktotheoz closed 10 years ago

ktotheoz commented 10 years ago

While compiling with GCC 4.8 you will receive errors like this one: ./Platform/Utility.inl:430:41: error: ‘has_trivial_destructor’ is not a member of ‘std’ _ArrayInPlaceDestruct( pMemory, count, std::has_trivial_destructor< T >() );

The problem is that in 4.8 has_trivial_destructor was renamed to is_trivially_destructible.

A possible solution can be found here: http://stackoverflow.com/a/12716778

gorlak commented 10 years ago

Yeah, those post-TR1 traits are tricky. Glancing at the code it looks like we currently alias the old trait function here: https://github.com/HeliumProject/Platform/blob/master/TypeTraits.h (using inheritance). Perhaps the compiler version check is failing? I will check it out when I get a chance.