Skip to content

[libc++] make_optional and make_any lack implicit SFINAE constraints #54569

@frederick-vs-ja

Description

@frederick-vs-ja

[structure.specifications]/4 specifies that "Effects: Equivalent to:" sometimes propagates "Constraints:". make_optional and make_any are specified with such implicit constraints, but libc++ currently doesn't constraint them.

The template overload of operator= of move_only_function and the non-member swap of expected<cv void, E> (currently unimplemented in libc++) also have such implicit SFINAE constraints.

Note that there is a related open LWG issue: LWG3627.

Update:

LWG3627 is to be resolved. But the P2988R12 added a new constraint to the affected make_optional overload, so it's questionable whether "Effects: Equivalent to" still imposes implicit SFINAE constraints.

I think we should add implicit SFINAE constraints to it. A new LWG issue is possibly necessary.

Metadata

Metadata

Labels

libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions