STL icon indicating copy to clipboard operation
STL copied to clipboard

P2407R5 Freestanding Library: Partial Classes

Open StephanTLavavej opened this issue 2 years ago • 1 comments

WG21-P2407R5 Freestanding Library: Partial Classes

Feature-test macros (expected):

#define __cpp_lib_freestanding_algorithm   202311L
#define __cpp_lib_freestanding_array       202311L
#define __cpp_lib_freestanding_optional    202311L
#define __cpp_lib_freestanding_string_view 202311L
#define __cpp_lib_freestanding_variant     202311L

We're not entirely sure what our hosted implementation needs to do here. IF the only thing that we need to do is define these feature-test macros, then we'll accept a PR for this (like #3837) before we open up the floodgates to arbitrary C++26 features.

StephanTLavavej avatar Nov 12 '23 22:11 StephanTLavavej

I'm now entirely sure. P2407R5 adds wording "On freestanding implementations, it is implementation-defined whether each entity introduced by a freestanding-deleted function is a deleted function ([dcl.fct.def.delete]) or whether the requirements are the same as the corresponding requirements for a hosted implementation." Our hosted implementation trivially conforms since it implements the entities as specified.

TLDR: we only need define the new feature-test macros.

CaseyCarter avatar Nov 15 '23 22:11 CaseyCarter