mardi 23 février 2016

Test for C++11 in GCC 4.6

This fails to compile under GCC 4.6:

#if __cplusplus >= 201103L
#include <ratio>
#endif

__cplusplus should be set to "1" in GCC 4.6 according to this bug: http://ift.tt/1p0G8Od

How should I test for C++11 support in GCC 4.6?

EDIT: I want to use Boost ratio when built with GCC 4.6 and std ratio with GCC 4.8 and -std=c++11. The rest of the code is ready for this, it's just this include that fails to compile.

Aucun commentaire:

Enregistrer un commentaire