Add specializations of basic_common_reference and common_type for pair
Details
- Reviewers
• Quuxplusone ldionne Mordante - Group Reviewers
Restricted Project - Commits
- rG598983d7a96e: [libc++][P2321R2] Add specializations of basic_common_reference and common_type…
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Looks good to me, modulo some nits and scope-creep followup ideas.
libcxx/include/__utility/pair.h | ||
---|---|---|
323 | Let's make this easy to compare to lines 320-321 at a glance. | |
333–336 | Let's keep the deduction guide for pair located right after class pair; both because it's more tightly "related" to the class than these partial specializations, and so that the library additions remain in chronological order (C++03, then C++17 deduction guide, then C++2b specializations). | |
libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_reference.compile.pass.cpp | ||
204–205 | Let's pick one style and be consistent here: either one-line all of these like lines 202, 203, etc; or two-line them all like lines 204-205, 206-207, etc. | |
libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp | ||
363–376 | Should this say common_type_t instead of common_reference_t? or what's this line doing here? Ditto below. Orthogonally, and probably in a separate NFC commit, can common_type.pass.cpp be renamed to common_type.compile.pass.cpp (and eliminate its main)? |
LGTM, modulo one small issue. Please rebase to make sure the CI becomes green.
libcxx/include/__utility/pair.h | ||
---|---|---|
392 | Please update the synopsis in <utility>. |
Let's make this easy to compare to lines 320-321 at a glance.