bombomby / optick

C++ Profiler For Games
https://optick.dev
MIT License
2.95k stars 296 forks source link

Build fails with GCC 11 #149

Open zdenyhraz opened 2 years ago

zdenyhraz commented 2 years ago

With GCC 11.1.0, the build fails with the following error:

image

With GCC 9.3.0, the build succeeds with no issues.

AtlaStar commented 2 years ago

the const_pointer member was removed from std::allocator in C++20. GCC 11.1.0 defaults to C++17 where its use is deprecated but is still a member of the allocator class.

More info on how it affected GCC in specific can be found here, but the gist is that those data members were superfluous and existed in std::allocator_traits which is the intended way to get certain members that used to belong to allocator.

Fix seems it is a simple matter of using std::allocator_traits to get the const_pointer member from it rather than std::allocator which appears to have a PR sitting since June of last year to fix...