microsoft / STL

MSVC's implementation of the C++ Standard Library.
Other
10.07k stars 1.48k forks source link

Use `requires`-clauses and concepts for container-like components since C++20 #4718

Closed frederick-vs-ja closed 3 months ago

frederick-vs-ja commented 3 months ago

Towards #602.

New internal concepts _Iterator_for_container, _Allocator_for_container, and _Hasher_for_container are mainly added for plain disambiguating constraints (as required by the standard).

Edit: desired changes for priority_queue didn't work since MSVC and Clang haven't implemented CWG-2369 (Godbolt link).

Edit: reduced the bug of EDG - DevCom-10678753.

StephanTLavavej commented 3 months ago

This is great, thank you! :heart_eyes_cat: Less SFINAE means a happier codebase.

StephanTLavavej commented 3 months ago

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

StephanTLavavej commented 3 months ago

Thanks for substituting away all of this SFINAE! :joy_cat: :magic_wand: :partying_face: