Skip to content
This repository was archived by the owner on Jan 29, 2026. It is now read-only.

Fix the std::in_place_type_t overload for SFINAE-unsafe facades#223

Merged
mingxwa merged 4 commits intomicrosoft:mainfrom
mingxwa:user/mingxwa/in_place_type
Dec 23, 2024
Merged

Fix the std::in_place_type_t overload for SFINAE-unsafe facades#223
mingxwa merged 4 commits intomicrosoft:mainfrom
mingxwa:user/mingxwa/in_place_type

Conversation

@mingxwa
Copy link
Contributor

@mingxwa mingxwa commented Dec 20, 2024

This change explicitly excludes proxy(P&& ptr) from overload resolution if P is a (possibly cv-qualified) specialization of std::in_place_type_t. It aligns with the implementation of std::any in MSVC and libstdc++.

Note that Clang 15 could not handle the situation where concepts are mixed with SFINAE. The test case will still fail in Clang 15. Since it is not trivial to work around, I removed support for Clang 15 from our pipeline and README for now. (See the previous CI build).

Resolves #222. Another unit test case was added accordingly.

@mingxwa mingxwa requested review from guominrui and tian-lt December 20, 2024 07:25
@mingxwa mingxwa merged commit 248e8cf into microsoft:main Dec 23, 2024
@mingxwa mingxwa deleted the user/mingxwa/in_place_type branch December 23, 2024 07:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

std::in_place_type_t overload broken when a dispatch is not SFINAE-safe

2 participants