bombomby / optick

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

Fix compilation in C++20 mode #131

Closed henriquegemignani closed 2 years ago

henriquegemignani commented 3 years ago

std::allocator pointer and const_pointer were removed in C++20. Replacing with just adding the decorations around value_type.

AtlaStar commented 2 years ago

Would just using value_type actually be better than just using the const_pointer and pointer members of std::allocator_traits as is now intended by the standard? const_pointer and pointer still exist, they just don't belong to the allocator class and solely belong to allocator_traits now, with the added benefit that if Alloc::pointer and Alloc::const_pointer don't exist the return is just value_type* and a rebind of value_type to add const qualifiers to it respectively.