lundi 5 décembre 2016

Improve check for if __cplusplus is C++11 or greater

Currently i have the following code:

#if __cplusplus >= 201112L
#define IO_DEBUG 1
#include <chrono>
#endif

While when compiling in both, 4.6 and 6.2 versions of gcc yield the expected results (i.e, the IO_DEBUG is defined when the __cplusplus version is at least 201112L), i'm wondering if there is a more efficient way to check this?.

Aucun commentaire:

Enregistrer un commentaire