teslamotors / fixed-containers

C++ Fixed Containers
MIT License
352 stars 31 forks source link

Use _GLIBXX_RELEASE instead of __GNUC__ to detect version of libstdc++ #53

Closed alexkaratarakis closed 12 months ago

alexkaratarakis commented 12 months ago

clang defines the GNUC,GNUC_MINOR, GNUC_PATCHLEVEL macros, but they are hardcoded to version 4.2.1 and do not reflect the real version of libstdc++.

Instead, use _GLIBCXX_RELEASE. This allows proper libstdc++ version detection when compiling with clang (and using gcc libs)