Skip to content

P2988R12 optional<T&> #5607

Description

WG21-P2988R12 optional<T&>
WG21-P3836R2 Make optional<T&> Trivially Copyable
LWG-4299 Missing Mandates: part in optional<T&>::transform
LWG-4300 Missing Returns: element in optional<T&>::emplace
LWG-4304 std::optional<NonReturnable&> is ill-formed due to value_or
LWG-4308 std::optional<T&>::iterator can't be a contiguous iterator for some T
LWG-4439 std::optional<T&>::swap possibly selects ADL-found swap

Also note #5871 tracking:
LWG-4015 LWG-3973 broke const overloads of std::optional monadic operations

INCREASED feature-test macros:

#define __cpp_lib_freestanding_optional 202506L
#define __cpp_lib_optional              202506L

Note: We are not yet accepting PRs for C++26 features.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cxx26C++26 feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions