🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Clang Asgettypetraits

Started by
3 comments, last by WitchLord 7 years, 11 months ago
I'm guessing this is a bug, so I'm marking it as one.

Compiling on MSVC and GCC are fine, but when you try to compile 2.31.1 on clang (via CMake in my case), you get an error about std::has_trivial_destructor not existing. This is on clang 3.8 on Ubuntu 16.04.

If I add defined(__clang__) to the first block (for "MSVC, Xcode/clang, and gnuc 5+"), it builds and runs fine.
Advertisement

Thanks. I'll add defined(__clang__).

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Fixed in revision 2335

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Hah, had exactly the same problem on Ubuntu, spent several hours trying to figure out why my environment is incorrect (had other problems along the way, with standard headers not being found for clang with C++11 defined and so on), and I ended up with the same solution, adding __clang__ check to that condition, as for clang GNUC was reported as 4.2 (even though headers used were 5.0+), and somehow it didn't define _LIBCPP_TYPE_TRAITS either.

Good to know my temporary fix was the right thing to do :) Wish I waited a bit and actually see this post rather than spend so much time trying to fix what I thought was wrong Clang installation on Ubuntu.


Where are we and when are we and who are we?
How many people in how many places at how many times?

Whether or not it is the right thing to do only the future will tell :).

Making code compile without warnings/errors on all types of compilers is difficult, especially as the compilers themselves evolve and change how they handle things. What works today, may very work stop working when a new version of compiler X or Y is released. Or else, someone is stuck using an older compiler, and a backwards compatibility mode is needed in the code.

Luckily it is usually only minor tweaks that are needed, and can easily be fixed as soon as someone identifies that there is a problem.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement