teslamotors / fixed-containers

C++ Fixed Containers
MIT License
395 stars 38 forks source link

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

Closed alexkaratarakis closed 1 year ago

alexkaratarakis commented 1 year 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)