Closed pauldreik closed 3 weeks ago
This is confusing, it is a template. http://eel.is/c++draft/allocator.traits#:~:text=rebind_traits
Do you have an example, I wonder if this is an issue with gcc 12
I just cloned the repo and then ran the cmake+build command above. All the code is in this repo. Or do I perhaps misunderstand what you mean? I edited the text to show the clone command as well.
I reproduced the same error also on debian testing, using gcc 12.4.0. gcc 13 and 14 work fine.
I made a reproducer on godbolt:
#include <memory>
#include <type_traits>
template <typename T, typename U>
inline constexpr bool allocator_has_rebind_v = requires {
typename std::allocator_traits<T>::template rebind_traits<U>::type;
};
Glad they fixed it. I am just testing, but I will add a compilation define for all of these that disables them and uses SFINAE/specialization, the pre-20 way.
Thanks for fixing it! It now compiles.
I wonder - why was this not caught in CI? it seems like gcc 12 is tested with C++20. EDIT: it was caught in CI: https://github.com/beached/daw_json_link/actions/runs/11529159711/job/32097261291
Using debian stable, with gcc 12.2.0 (currently 12.2.0-14), I get the following build failure on commit 85f5f3f3d15a27fa000733f758b157d2267a74c8 :
Using gcc12+cpp17 works fine, as well as gcc11+cpp20