strong_type
strong_type copied to clipboard
`strong::range` modifier compiler errors for `std::set` in v15
Since v15, wrapping a std::set in a strong type with the strong::range modifier, causes compiler errors, i.e.
using Set = strong::type<std::set<std::string_view>, struct Set_, strong::range>;
See https://godbolt.org/z/fM6q543dc (change to v14 and the program runs fine).
Ouch, that's bad. I'll look into it. Thank you for reporting.
Can you try branch range_const_iter and let me know how it works? The solution there does not sit well with clang 16/17 with C++23, which I have to find a solution for, but it'd be good to know if I'm on the right track or if there are more problems.
Fixed the clang issue. I had the wrong starting date for ranges-support in libstdc++
Thanks for the quick fix!
I ended up working around the issue somewhat for the time being by making the element a strong type, rather than the whole container, so I no longer (currently) have a use-case for a strongly-typed std::set :roll_eyes:
That said, the unit test case looks bang on, and the fix itself looks reasonable to my untrained eye :+1:
It's fixed on main now. I'm leaving the issue open until I have tagged a release. Thanks again for reporting the issue.
@rollbear When do you plan a new release? :)