Files
gcc/libstdc++-v3/include/bits/version.def
Marek Polacek 4b0e94b394 c++: C++26 Reflection [PR120775]
This patch implements C++26 Reflection as specified by P2996R13, which allows
users to perform magic.  This patch also implements related papers:
Annotations for Reflection (P3394R4),
Splicing a base class subobject (P3293R3),
define_static_{string,object,array} (P3491R3),
Function Parameter Reflection (P3096R12).
(I already implemented consteval blocks back in July.)
(We do not yet implement P3795.)

We also implemented some CWG issues that had been approved in Kona;
e.g., CWG 3101, 3109, 3111, 3115, 3117.

All metafunctions are implemented in this patch.

The feature needs to be enabled by -std=c++26 -freflection.

Some stats: the v1 patch was over 51,200 LOC which were written in ~335
commits.  It came with over 400 tests with 11,722 static_asserts.  We still
had about 50 TODOs and FIXMEs in the code.
v2 consists of about 56,000 LOC which were created in 440 commits.  We
now have 446 tests with 40 TODOs remaining.
v3 brought another 77 commits, mostly clean-ups and various bug fixes.

I'd like to thank:
Jakub Jelinek, whose efforts can only be described as heroic and who
never ceases to amaze me even after nearly 15 years of working together,
he implemented many difficult metafunctions, annotations, mangling,
converted our metafunction dispatch to using gperf, and so on and on;
Jonathan Wakely for his libstdc++ patch review and generous & impeccable
advice even at odd hours; Dan Katz for his work on the Reflection papers,
writing Reflection tests for clang++ (many of which I've stolen^Wused),
for his advice, bug reports, and generally cheering me on; Jason Merrill
for his guidance, patch review, and, in fact, encouraging me to take on
this project in the first place; Michael Levine, Valentyn Yukhymenko, and
Alex Yesmanchyk for their nice contributions to Reflection; and Tomasz
Kamiński for providing test cases, finding bugs, and answering my C++
questions.

	PR c++/120775
	PR c++/123081
	PR c++/122634

gcc/ChangeLog:

	* attribs.cc (attribute_value_equal): Return false if either attribute
	is ATTR_UNIQUE_VALUE_P.
	(merge_attributes): Handle lists with ATTR_UNIQUE_VALUE_P values.
	* doc/invoke.texi: Document -freflection.
	* dwarf2out.cc (is_base_type) <case default>: Check
	TREE_CODE >= LAST_AND_UNUSED_TREE_CODE instead of is_cxx_auto.
	(gen_type_die_with_usage): For TREE_CODE >= LAST_AND_UNUSED_TREE_CODE
	trees use use DW_TAG_unspecified_type.
	* tree-core.h (struct tree_base): Update a comment.
	* tree.h (ATTR_UNIQUE_VALUE_P): Define.
	(BINFO_BASE_ACCESSES): Update the comment.

gcc/c-family/ChangeLog:

	* c-attribs.cc (attribute_takes_identifier_p): Return false for C++
	annotations.  Handle "old parm name".
	* c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_impl_reflection.
	* c.opt (freflection): New.

gcc/cp/ChangeLog:

	* Make-lang.in: Add cp/reflect.o.  Add a rule for cp/metafns.h.
	* config-lang.in: Add reflect.cc.
	* constexpr.cc (constexpr_global_ctx): Add consteval_block and
	metafns_called members.  Initialize them.
	(cxx_constexpr_quiet_p): New.
	(cxx_constexpr_manifestly_const_eval): New.
	(cxx_constexpr_caller): New.
	(cxx_constexpr_consteval_block): New.
	(enum value_cat): Move into cp-tree.h.
	(cxx_eval_constant_expression): Move the declaration into cp-tree.h.
	No longer static.  Handle REFLECT_EXPR.  Handle conversion of
	a reflection to the meta::info type.
	(cxx_eval_cxa_builtin_fn): Override current_function_decl.
	(cxx_eval_builtin_function_call): Handle __builtin_is_string_literal.
	(is_std_allocator): Also check __new_allocator.
	(is_std_allocator_allocate): No longer static.
	(cxa_allocate_and_throw_exception): New.
	(cxx_eval_call_expression): Handle metafunctions.  Maybe set
	metafns_called.
	(reduced_constant_expression_p): Handle REFLECT_EXPR.
	(cxx_eval_binary_expression): Use compare_reflections for comparing
	reflections.
	(find_immediate_fndecl): Don't walk REFLECT_EXPR_P.
	(cxx_eval_outermost_constant_expr): Set global_ctx.consteval_block.
	Detect consteval-only smuggling.
	(potential_constant_expression_1): Return true for REFLECT_EXPR
	and SPLICE_EXPR.
	* constraint.cc (diagnose_trait_expr): Add CPTK_IS_CONSTEVAL_ONLY case.
	* cp-gimplify.cc (immediate_escalating_function_p): No longer static.
	(promote_function_to_consteval): Likewise.
	(cp_gimplify_expr) <case CALL_EXPR>: Detect any surviving consteval-only
	expressions.
	<case CP_BUILT_IN_IS_STRING_LITERAL>: Handle.
	(wipe_consteval_only_r): New.
	(cp_fold_immediate_r): Detect invalid uses of consteval-only types.
	Clear consteval-only DECL_EXPRs.
	(cp_genericize_r): Wipe consteval-only vars from BIND_EXPR_VARS and
	BLOCK_VARS.
	* cp-objcp-common.cc (cp_common_init_ts): Mark META_TYPE, SPLICE_SCOPE,
	SPLICE_EXPR, and REFLECT_EXPR.
	* cp-trait.def (IS_CONSTEVAL_ONLY): New trait.
	* cp-tree.def (REFLECT_EXPR, META_TYPE, SPLICE_EXPR, SPLICE_SCOPE): New
	trees.
	* cp-tree.h (enum cp_tree_index): Add CPTI_ANNOTATION_IDENTIFIER,
	CPTI_STD_META, and CPTI_META_INFO_TYPE.
	(std_meta_node): Define.
	(meta_info_type_node): Define.
	(annotation_identifier): Define.
	(REFLECTION_TYPE_P): Define.
	(REFLECT_EXPR_P): Define.
	(REFLECT_EXPR_HANDLE): Define.
	(enum reflect_kind): New.
	(REFLECT_EXPR_KIND): Define.
	(SET_REFLECT_EXPR_KIND): Define.
	(SPLICE_EXPR_EXPRESSION_P): Define.
	(SET_SPLICE_EXPR_EXPRESSION_P): Define.
	(SPLICE_EXPR_MEMBER_ACCESS_P): Define.
	(SET_SPLICE_EXPR_MEMBER_ACCESS_P): Define.
	(SPLICE_EXPR_ADDRESS_P): Define.
	(SET_SPLICE_EXPR_ADDRESS_P): Define.
	(SPLICE_SCOPE_EXPR): Define.
	(SPLICE_SCOPE_TYPE_P): Define.
	(WILDCARD_TYPE_P): Include SPLICE_SCOPE.
	(COMPONENT_REF_SPLICE_P): Define.
	(SCALAR_TYPE_P): Include REFLECTION_TYPE_P.
	(ENUM_BEING_DEFINED_P): Define.
	(OLD_PARM_DECL_P): Define.
	(MULTIPLE_NAMES_PARM_P): Define.
	(cp_preserve_using_decl): Declare.
	(DEF_OPERATOR, DEF_ASSN_OPERATOR): Include META.
	(struct ovl_op_info_t): Add meta_name member.
	(enum cp_built_in_function): Add CP_BUILT_IN_IS_STRING_LITERAL.
	(build_stub_type): Declare.
	(current_function_decl_without_access_scope): Declare.
	(dependent_namespace_p): Declare.
	(convert_reflect_constant_arg): Declare.
	(finish_base_specifier): Adjust declaration.
	(parsing_lambda_declarator): Declare.
	(fold_builtin_is_string_literal): Declare.
	(annotation_p): Declare.
	(finish_class_member_access_expr): Adjust declaration.
	(immediate_escalating_function_p): Declare.
	(promote_function_to_consteval): Declare.
	(is_std_allocator_allocate): Declare.
	(cxa_allocate_and_throw_exception): Declare.
	(enum value_cat): Define.
	(cxx_eval_constant_expression): Declare.
	(cxx_constexpr_quiet_p): Declare.
	(cxx_constexpr_manifestly_const_eval): Declare.
	(cxx_constexpr_caller): Declare.
	(cxx_constexpr_consteval_block): Declare.
	(init_reflection): Declare.
	(metafunction_p): Declare.
	(direct_base_parent): Declare.
	(process_metafunction): Declare.
	(get_reflection): Declare.
	(get_null_reflection): Declare.
	(splice): Declare.
	(check_out_of_consteval_use): Declare.
	(consteval_only_p): Declare.
	(compare_reflections): Declare.
	(valid_splice_type_p): Declare.
	(valid_splice_scope_p): Declare.
	(check_splice_expr): Declare.
	(make_splice_scope): Declare.
	(dependent_splice_p): Declare.
	(reflection_mangle_prefix): Declare.
	(check_consteval_only_fn): Declare.
	* cvt.cc (convert_to_void): Call check_out_of_consteval_use.
	* cxx-pretty-print.cc (cxx_pretty_printer::unary_expression): New
	REFLECT_EXPR case.
	(cxx_pretty_printer::expression): Likewise.
	(cxx_pretty_printer::simple_type_specifier): New META_TYPE case.
	(cxx_pretty_printer::type_id): Likewise.
	* decl.cc (duplicate_decls): Merge parameter names for Reflection.
	Maybe set OLD_PARM_DECL_P.
	(initialize_predefined_identifiers): Add "annotation ".
	(cxx_init_decl_processing): Add __builtin_is_string_literal.  Call
	init_reflection.
	(maybe_commonize_var): Do nothing for consteval_only_p.
	(check_initializer): Default-initialize std::meta::info.
	(make_rtl_for_nonlocal_decl): For consteval_only_p vars, set
	DECL_EXTERNAL and return early.
	(cp_finish_decl): Call check_out_of_consteval_use.  Don't go
	creating a varpool node for consteval_only_p.
	(get_tuple_size): Check the instantiation instead of the type.
	(grokfndecl): Call check_consteval_only_fn.
	(xref_basetypes): Stitch annotations onto BINFO_BASE_ACCESSES.
	(finish_enum_value_list): Clear ENUM_BEING_DEFINED_P.
	* decl2.cc (is_late_template_attribute): Handle all annotations as
	late.
	(cp_check_const_attributes): Don't handle annotations here.
	(maybe_make_one_only): Do nothing for consteval_only_p.
	(mark_needed): Likewise.
	(min_vis_expr_r): Handle reflections.
	(prune_vars_needing_no_initialization): Skip consteval_only_p.
	(no_linkage_error): Return early for metafunctions.
	(c_parse_final_cleanups): Don't write out consteval_only_p vars.  Avoid
	complaining about metafunctions.
	* error.cc (dump_type): New cases for CONST_DECL, META_TYPE, and
	SPLICE_SCOPE.
	(dump_type_prefix): New cases for META_TYPE and SPLICE_SCOPE.
	(dump_type_suffix): Likewise.
	(dump_decl): Dump SPLICE_EXPR.
	(dump_expr): Dump REFLECT_EXPR and SPLICE_EXPR.
	* init.cc (build_zero_init_1): Build a null reflection value.
	(perform_member_init): Call check_out_of_consteval_use.
	* lex.cc (DEF_OPERATOR, OPERATOR_TRANSITION): Update defines.
	* mangle.cc (write_type): Mangle META_TYPE.
	(write_expression): Handle REFLECT_EXPR.
	(write_reflection): New.
	(write_template_arg_literal): New REFLECT_EXPR case.
	(write_template_arg): Handle REFLECT_EXPR.
	* method.cc (build_stub_type): No longer static.
	* module.cc (trees_out::type_node): Handle META_TYPE.
	(trees_in::tree_node): Likewise.
	* name-lookup.cc (name_lookup::adl_type): std::meta is an associated
	namespace of std::meta::info.
	(strip_using_decl): Don't strip when cp_preserve_using_decl.
	(handle_namespace_attrs): Handle annotations.
	(do_namespace_alias): Handle SPLICE_EXPR.
	(lookup_qualified_name): When cp_preserve_using_decl, don't do
	OVL_FUNCTION.
	(finish_using_directive): Detect annotations on using directive.
	* operators.def: Update for META_NAME.
	* parser.cc: New cp_preserve_using_decl global.
	(enum required_token): Add RT_CLOSE_SPLICE.
	(get_required_cpp_ttype): Return CPP_CLOSE_SPLICE for RT_CLOSE_SPLICE.
	(cp_parser_next_tokens_start_splice_type_spec_p): New.
	(cp_parser_next_tokens_can_start_splice_scope_spec_p): New.
	(cp_parser_splice_specifier): New.
	(cp_parser_splice_type_specifier): New.
	(cp_parser_splice_expression): New.
	(cp_parser_splice_scope_specifier): New.
	(cp_parser_splice_spec_is_nns_p): New.
	(cp_parser_nth_token_starts_splice_without_nns_p): New.
	(cp_parser_primary_expression): Handle CPP_OPEN_SPLICE.  Give an
	error for ^^ outside reflection.
	(cp_parser_unqualified_id): Allow r.~typename [:R:].
	(cp_parser_nested_name_specifier_opt): Cope with splice-scope-specifier.
	(cp_parser_qualifying_entity): Parse splice-scope-specifier.
	(cp_parser_postfix_expression): Deal with [: :] after a typename.
	(cp_parser_postfix_dot_deref_expression): Parse & handle splices
	in a class member access.  Pass splice_p to
	finish_class_member_access_expr.
	(cp_parser_reflection_name): New.
	(cp_parser_reflect_expression): New.
	(cp_parser_unary_expression): Parse reflect-expression.
	(cp_parser_declaration): Parse splice-scope-specifier.
	(cp_parser_decomposition_declaration): Detect annotations on structured
	bindings.
	(cp_parser_decltype_expr): Parse splice-expression.
	(cp_parser_template_id): New parsed_templ argument.  If it's nonnull,
	don't parse the template name.  Turn an assert into a condition.
	(cp_parser_type_specifier): Handle typename [: :].
	(cp_parser_simple_type_specifier): Parse splice-type-specifier.
	(cp_parser_enum_specifier): Set ENUM_BEING_DEFINED_P.
	(cp_parser_namespace_alias_definition): Parse splice-specifier.
	(cp_parser_using_directive): Likewise.
	(cp_parser_type_id_1): New bool * parameter to distinguish between
	types and type aliases.  Set it.
	(cp_parser_type_id): Adjust the call to cp_parser_type_id_1.
	(cp_parser_template_type_arg): Likewise.
	(cp_parser_trailing_type_id): Likewise.
	(cp_parser_base_specifier): Handle annotations.  Maybe give an error
	for splice-scope-specifier.  Parse splice-type-specifier.  Pass
	annotations to finish_base_specifier.
	(cp_parser_annotation): New.
	(cp_parser_std_attribute_list): Detect mixing annotations and attributes
	in the same list.
	(cp_parser_annotation_list): New.
	(cp_parser_std_attribute_spec): Parse annotations.
	(cp_parser_skip_balanced_tokens): Also handle CPP_OPEN_SPLICE
	and CPP_CLOSE_SPLICE.
	(cp_parser_type_requirement): Parse splice-type-specifier.
	(cp_parser_lookup_name): Also consider dependent namespaces.  Don't
	call check_accessibility_of_qualified_id for USING_DECLs.
	(cp_parser_required_error): Handle RT_CLOSE_SPLICE.
	* pt.cc (current_function_decl_without_access_scope): New.
	(verify_unstripped_args_1): REFLECT_EXPR_P is OK.
	(iterative_hash_template_arg): Handle REFLECT_EXPR.
	(convert_nontype_argument): Maybe give an error for REFLECTION_TYPE_P.
	(for_each_template_parm_r): Handle SPLICE_SCOPE.
	(instantiate_class_template): Handle annotations.
	(tsubst_pack_index): Make static.
	(tsubst_decl): Handle NAMESPACE_DECL.
	(tsubst_splice_scope): New.
	(tsubst_splice_expr): New.
	(tsubst): Don't return early for NAMESPACE_DECL.   New META_TYPE case.
	Handle a splice-specifier that expanded into a NAMESPACE_DECL.  Handle
	SPLICE_SCOPE, SPLICE_EXPR, and TEMPLATE_ID_EXPR.
	(tsubst_scope): Also accept NAMESPACE_DECL.
	(tsubst_qualified_id): Check dependent_namespace_p.
	(tsubst_lambda_expr): Set LAMBDA_EXPR_CONSTEVAL_BLOCK_P.
	(tsubst_expr): Allow dependent_splice_p in an assert.  Check
	COMPONENT_REF_SPLICE_P and pass it to finish_class_member_access_expr.
	<case NAMESPACE_DECL>: Remove.
	New REFLECT_EXPR and SPLICE_EXPR cases.
	(unify): Handle META_TYPE.
	(instantiate_body): Call check_consteval_only_fn.
	(tsubst_enum): Set ENUM_BEING_DEFINED_P.
	(dependent_type_p_r): A splice-scope-specifier is dependent.
	(dependent_namespace_p): New.
	(value_dependent_expression_p): Handle REFLECT_EXPR.  Also handle
	[meta.reflection.access.context]/8.
	(type_dependent_expression_p): REFLECT_EXPR_P is not type-dependent.
	(convert_reflect_constant_arg): New.
	* search.cc (check_final_overrider): Adjust for CWG 3117.
	* semantics.cc (finish_base_specifier): Handle annotations.
	(parsing_lambda_declarator): No longer static.
	(finish_id_expression_1): Check dependent_namespace_p.
	(fold_builtin_is_string_literal): New.
	(trait_expr_value): Handle CPTK_IS_CONSTEVAL_ONLY.
	(finish_trait_expr): Likewise.
	* tree.cc (handle_annotation_attribute): New.
	(builtin_valid_in_constant_expr_p): Return true for
	CP_BUILT_IN_IS_STRING_LITERAL.
	(cp_tree_equal): Handle comparing REFLECT_EXPRs.
	(internal_attributes): Add "annotation ".
	(annotation_p): New.
	* typeck.cc (finish_class_member_access_expr): New splice_p argument.
	Handle dependent splices.  Implement splicing a base class subobject.
	Handle class member access using a splice-expression.
	(cp_build_binary_op): Handle comparing std::meta::infos.
	(check_return_expr): Call check_out_of_consteval_use.
	* metafns.gperf: New file.
	* metafns.h: New file.
	* reflect.cc: New file.

libcc1/ChangeLog:

	* libcp1plugin.cc (start_class_def): Update the call to
	finish_base_specifier.

libcpp/ChangeLog:

	* charset.cc (_cpp_destroy_iconv): Destroy narrow_cset_desc and
	utf8_cset_desc.
	(cpp_translate_string): New.
	(cpp_valid_identifier): New.
	* include/cpplib.h: Add OPEN_SPLICE, CLOSE_SPLICE, and REFLECT_OP to
	TTYPE_TABLE.
	(cpp_translate_string): Declare.
	(cpp_valid_identifier): Declare.
	* internal.h (struct cpp_reader): Add reverse_narrow_cset_desc and
	reverse_utf8_cset_desc fields.
	* lex.cc (_cpp_lex_direct): Emit CPP_CLOSE_SPLICE, CPP_REFLECT_OP,
	and CPP_OPEN_SPLICE tokens.

libstdc++-v3/ChangeLog:

	* include/Makefile.am (std_headers): Add ${std_srcdir}/meta.
	* include/Makefile.in: Regenerate.
	* include/bits/iterator_concepts.h (std::ranges::__access::__begin): Add
	constexpr.
	* include/bits/version.def (reflection): New.
	* include/bits/version.h: Regenerate.
	* include/precompiled/stdc++.h: Include <meta> for C++26.
	* include/std/meta: New file.
	* include/std/type_traits (std::is_reflection): New trait.
	(std::is_fundamental): Include is_reflection for C++26 -freflection.
	(std::is_reflection_v): New variable template.
	(std::is_consteval_only): New trait.
	(std::is_consteval_only_v): New variable template.
	* src/c++23/std.cc.in: Add <meta> exports.
	* testsuite/20_util/variable_templates_for_traits.cc: Add -freflection as
	dg-additional-options for C++26.  Add std::is_reflection_v test in that case.
	* testsuite/20_util/is_consteval_only/requirements/explicit_instantiation.cc: New test.
	* testsuite/20_util/is_consteval_only/requirements/typedefs.cc: New test.
	* testsuite/20_util/is_consteval_only/value.cc: New test.
	* testsuite/20_util/is_reflection/requirements/explicit_instantiation.cc: New test.
	* testsuite/20_util/is_reflection/requirements/typedefs.cc: New test.
	* testsuite/20_util/is_reflection/value.cc: New test.

gcc/testsuite/ChangeLog:

	* g++.dg/DRs/dr2581-1.C: Add -freflection.
	* g++.dg/DRs/dr2581-2.C: Likewise.
	* g++.dg/reflect/access_context1.C: New test.
	* g++.dg/reflect/access_context2.C: New test.
	* g++.dg/reflect/access_context3.C: New test.
	* g++.dg/reflect/adl1.C: New test.
	* g++.dg/reflect/alignment_of1.C: New test.
	* g++.dg/reflect/alignment_of2.C: New test.
	* g++.dg/reflect/annotations1.C: New test.
	* g++.dg/reflect/annotations2.C: New test.
	* g++.dg/reflect/annotations3.C: New test.
	* g++.dg/reflect/annotations4.C: New test.
	* g++.dg/reflect/annotations5.C: New test.
	* g++.dg/reflect/annotations6.C: New test.
	* g++.dg/reflect/annotations7.C: New test.
	* g++.dg/reflect/annotations8.C: New test.
	* g++.dg/reflect/anon1.C: New test.
	* g++.dg/reflect/anon2.C: New test.
	* g++.dg/reflect/anon3.C: New test.
	* g++.dg/reflect/bases_of1.C: New test.
	* g++.dg/reflect/bases_of2.C: New test.
	* g++.dg/reflect/bases_of3.C: New test.
	* g++.dg/reflect/bit_size_of1.C: New test.
	* g++.dg/reflect/bitfield1.C: New test.
	* g++.dg/reflect/can_substitute1.C: New test.
	* g++.dg/reflect/class1.C: New test.
	* g++.dg/reflect/class2.C: New test.
	* g++.dg/reflect/common_reference1.C: New test.
	* g++.dg/reflect/common_type1.C: New test.
	* g++.dg/reflect/compare1.C: New test.
	* g++.dg/reflect/compare10.C: New test.
	* g++.dg/reflect/compare2.C: New test.
	* g++.dg/reflect/compare3.C: New test.
	* g++.dg/reflect/compare4.C: New test.
	* g++.dg/reflect/compare5.C: New test.
	* g++.dg/reflect/compare6.C: New test.
	* g++.dg/reflect/compare7.C: New test.
	* g++.dg/reflect/compare8.C: New test.
	* g++.dg/reflect/compare9.C: New test.
	* g++.dg/reflect/compat1.C: New test.
	* g++.dg/reflect/complete1.C: New test.
	* g++.dg/reflect/constant_of1.C: New test.
	* g++.dg/reflect/constant_of2.C: New test.
	* g++.dg/reflect/constant_of3.C: New test.
	* g++.dg/reflect/constant_of4.C: New test.
	* g++.dg/reflect/constant_of5.C: New test.
	* g++.dg/reflect/constant_of6.C: New test.
	* g++.dg/reflect/constant_of7.C: New test.
	* g++.dg/reflect/constant_of8.C: New test.
	* g++.dg/reflect/constant_of9.C: New test.
	* g++.dg/reflect/crash1.C: New test.
	* g++.dg/reflect/crash10.C: New test.
	* g++.dg/reflect/crash11.C: New test.
	* g++.dg/reflect/crash12.C: New test.
	* g++.dg/reflect/crash13.C: New test.
	* g++.dg/reflect/crash14.C: New test.
	* g++.dg/reflect/crash15.C: New test.
	* g++.dg/reflect/crash16.C: New test.
	* g++.dg/reflect/crash17.C: New test.
	* g++.dg/reflect/crash18.C: New test.
	* g++.dg/reflect/crash2.C: New test.
	* g++.dg/reflect/crash3.C: New test.
	* g++.dg/reflect/crash4.C: New test.
	* g++.dg/reflect/crash5.C: New test.
	* g++.dg/reflect/crash6.C: New test.
	* g++.dg/reflect/crash7.C: New test.
	* g++.dg/reflect/crash8.C: New test.
	* g++.dg/reflect/crash9.C: New test.
	* g++.dg/reflect/data_member_spec1.C: New test.
	* g++.dg/reflect/data_member_spec2.C: New test.
	* g++.dg/reflect/data_member_spec3.C: New test.
	* g++.dg/reflect/data_member_spec4.C: New test.
	* g++.dg/reflect/dealias1.C: New test.
	* g++.dg/reflect/dealias2.C: New test.
	* g++.dg/reflect/dealias3.C: New test.
	* g++.dg/reflect/define_aggregate1.C: New test.
	* g++.dg/reflect/define_aggregate2.C: New test.
	* g++.dg/reflect/define_aggregate3.C: New test.
	* g++.dg/reflect/define_aggregate4.C: New test.
	* g++.dg/reflect/define_aggregate5.C: New test.
	* g++.dg/reflect/define_static_array1.C: New test.
	* g++.dg/reflect/define_static_array2.C: New test.
	* g++.dg/reflect/define_static_array3.C: New test.
	* g++.dg/reflect/define_static_array4.C: New test.
	* g++.dg/reflect/define_static_object1.C: New test.
	* g++.dg/reflect/define_static_object2.C: New test.
	* g++.dg/reflect/define_static_string1.C: New test.
	* g++.dg/reflect/dep1.C: New test.
	* g++.dg/reflect/dep10.C: New test.
	* g++.dg/reflect/dep11.C: New test.
	* g++.dg/reflect/dep2.C: New test.
	* g++.dg/reflect/dep3.C: New test.
	* g++.dg/reflect/dep4.C: New test.
	* g++.dg/reflect/dep5.C: New test.
	* g++.dg/reflect/dep6.C: New test.
	* g++.dg/reflect/dep7.C: New test.
	* g++.dg/reflect/dep8.C: New test.
	* g++.dg/reflect/dep9.C: New test.
	* g++.dg/reflect/diag1.C: New test.
	* g++.dg/reflect/diag2.C: New test.
	* g++.dg/reflect/diag3.C: New test.
	* g++.dg/reflect/diag4.C: New test.
	* g++.dg/reflect/display_string_of1.C: New test.
	* g++.dg/reflect/eh1.C: New test.
	* g++.dg/reflect/eh2.C: New test.
	* g++.dg/reflect/eh3.C: New test.
	* g++.dg/reflect/eh4.C: New test.
	* g++.dg/reflect/eh5.C: New test.
	* g++.dg/reflect/eh6.C: New test.
	* g++.dg/reflect/eh7.C: New test.
	* g++.dg/reflect/eh8.C: New test.
	* g++.dg/reflect/eh9.C: New test.
	* g++.dg/reflect/enumerators_of1.C: New test.
	* g++.dg/reflect/error1.C: New test.
	* g++.dg/reflect/error10.C: New test.
	* g++.dg/reflect/error2.C: New test.
	* g++.dg/reflect/error3.C: New test.
	* g++.dg/reflect/error4.C: New test.
	* g++.dg/reflect/error5.C: New test.
	* g++.dg/reflect/error6.C: New test.
	* g++.dg/reflect/error8.C: New test.
	* g++.dg/reflect/error9.C: New test.
	* g++.dg/reflect/expr1.C: New test.
	* g++.dg/reflect/expr10.C: New test.
	* g++.dg/reflect/expr11.C: New test.
	* g++.dg/reflect/expr12.C: New test.
	* g++.dg/reflect/expr13.C: New test.
	* g++.dg/reflect/expr14.C: New test.
	* g++.dg/reflect/expr2.C: New test.
	* g++.dg/reflect/expr3.C: New test.
	* g++.dg/reflect/expr4.C: New test.
	* g++.dg/reflect/expr5.C: New test.
	* g++.dg/reflect/expr6.C: New test.
	* g++.dg/reflect/expr7.C: New test.
	* g++.dg/reflect/expr8.C: New test.
	* g++.dg/reflect/expr9.C: New test.
	* g++.dg/reflect/extract1.C: New test.
	* g++.dg/reflect/extract2.C: New test.
	* g++.dg/reflect/extract3.C: New test.
	* g++.dg/reflect/extract4.C: New test.
	* g++.dg/reflect/extract5.C: New test.
	* g++.dg/reflect/extract6.C: New test.
	* g++.dg/reflect/extract7.C: New test.
	* g++.dg/reflect/extract8.C: New test.
	* g++.dg/reflect/extract9.C: New test.
	* g++.dg/reflect/feat1.C: New test.
	* g++.dg/reflect/feat2.C: New test.
	* g++.dg/reflect/has_c_language_linkage1.C: New test.
	* g++.dg/reflect/has_default_argument1.C: New test.
	* g++.dg/reflect/has_default_argument2.C: New test.
	* g++.dg/reflect/has_default_member_initializer1.C: New test.
	* g++.dg/reflect/has_ellipsis_parameter1.C: New test.
	* g++.dg/reflect/has_external_linkage1.C: New test.
	* g++.dg/reflect/has_external_linkage2.C: New test.
	* g++.dg/reflect/has_identifier1.C: New test.
	* g++.dg/reflect/has_identifier2.C: New test.
	* g++.dg/reflect/has_internal_linkage1.C: New test.
	* g++.dg/reflect/has_internal_linkage2.C: New test.
	* g++.dg/reflect/has_linkage1.C: New test.
	* g++.dg/reflect/has_module_linkage1.C: New test.
	* g++.dg/reflect/has_module_linkage2.C: New test.
	* g++.dg/reflect/has_parent1.C: New test.
	* g++.dg/reflect/has_template_arguments1.C: New test.
	* g++.dg/reflect/has_template_arguments2.C: New test.
	* g++.dg/reflect/has_template_arguments3.C: New test.
	* g++.dg/reflect/has_template_arguments4.C: New test.
	* g++.dg/reflect/identifier_of1.C: New test.
	* g++.dg/reflect/identifier_of2.C: New test.
	* g++.dg/reflect/init1.C: New test.
	* g++.dg/reflect/init10.C: New test.
	* g++.dg/reflect/init11.C: New test.
	* g++.dg/reflect/init12.C: New test.
	* g++.dg/reflect/init13.C: New test.
	* g++.dg/reflect/init14.C: New test.
	* g++.dg/reflect/init15.C: New test.
	* g++.dg/reflect/init16.C: New test.
	* g++.dg/reflect/init17.C: New test.
	* g++.dg/reflect/init2.C: New test.
	* g++.dg/reflect/init3.C: New test.
	* g++.dg/reflect/init4.C: New test.
	* g++.dg/reflect/init5.C: New test.
	* g++.dg/reflect/init6.C: New test.
	* g++.dg/reflect/init7.C: New test.
	* g++.dg/reflect/init8.C: New test.
	* g++.dg/reflect/init9.C: New test.
	* g++.dg/reflect/is_accessible1.C: New test.
	* g++.dg/reflect/is_accessible2.C: New test.
	* g++.dg/reflect/is_alias_template1.C: New test.
	* g++.dg/reflect/is_assignment1.C: New test.
	* g++.dg/reflect/is_bit_field1.C: New test.
	* g++.dg/reflect/is_class_member1.C: New test.
	* g++.dg/reflect/is_class_template1.C: New test.
	* g++.dg/reflect/is_complete_type1.C: New test.
	* g++.dg/reflect/is_complete_type2.C: New test.
	* g++.dg/reflect/is_concept1.C: New test.
	* g++.dg/reflect/is_const1.C: New test.
	* g++.dg/reflect/is_consteval_only1.C: New test.
	* g++.dg/reflect/is_constructible_type1.C: New test.
	* g++.dg/reflect/is_constructible_type2.C: New test.
	* g++.dg/reflect/is_constructor_template1.C: New test.
	* g++.dg/reflect/is_constuctor1.C: New test.
	* g++.dg/reflect/is_conversion_function1.C: New test.
	* g++.dg/reflect/is_conversion_function_template1.C: New test.
	* g++.dg/reflect/is_copy_assignment1.C: New test.
	* g++.dg/reflect/is_copy_constructor1.C: New test.
	* g++.dg/reflect/is_data_member_spec1.C: New test.
	* g++.dg/reflect/is_default_constructor1.C: New test.
	* g++.dg/reflect/is_defaulted1.C: New test.
	* g++.dg/reflect/is_defaulted2.C: New test.
	* g++.dg/reflect/is_deleted1.C: New test.
	* g++.dg/reflect/is_deleted2.C: New test.
	* g++.dg/reflect/is_destructor1.C: New test.
	* g++.dg/reflect/is_enumerable_type1.C: New test.
	* g++.dg/reflect/is_enumerator1.C: New test.
	* g++.dg/reflect/is_explicit1.C: New test.
	* g++.dg/reflect/is_explicit2.C: New test.
	* g++.dg/reflect/is_explicit_object_parameter1.C: New test.
	* g++.dg/reflect/is_final1.C: New test.
	* g++.dg/reflect/is_function1.C: New test.
	* g++.dg/reflect/is_function2.C: New test.
	* g++.dg/reflect/is_function3.C: New test.
	* g++.dg/reflect/is_function_parameter1.C: New test.
	* g++.dg/reflect/is_function_parameter2.C: New test.
	* g++.dg/reflect/is_function_template1.C: New test.
	* g++.dg/reflect/is_function_template2.C: New test.
	* g++.dg/reflect/is_function_type1.C: New test.
	* g++.dg/reflect/is_literal_operator1.C: New test.
	* g++.dg/reflect/is_literal_operator_template1.C: New test.
	* g++.dg/reflect/is_lrvalue_reference_qualified1.C: New test.
	* g++.dg/reflect/is_move_assignment1.C: New test.
	* g++.dg/reflect/is_move_constructor1.C: New test.
	* g++.dg/reflect/is_mutable_member1.C: New test.
	* g++.dg/reflect/is_namespace1.C: New test.
	* g++.dg/reflect/is_namespace_alias1.C: New test.
	* g++.dg/reflect/is_namespace_member1.C: New test.
	* g++.dg/reflect/is_noexcept1.C: New test.
	* g++.dg/reflect/is_noexcept2.C: New test.
	* g++.dg/reflect/is_noexcept3.C: New test.
	* g++.dg/reflect/is_noexcept4.C: New test.
	* g++.dg/reflect/is_nonstatic_data_member1.C: New test.
	* g++.dg/reflect/is_object1.C: New test.
	* g++.dg/reflect/is_object2.C: New test.
	* g++.dg/reflect/is_operator_function1.C: New test.
	* g++.dg/reflect/is_operator_function_template1.C: New test.
	* g++.dg/reflect/is_override1.C: New test.
	* g++.dg/reflect/is_pure_virtual1.C: New test.
	* g++.dg/reflect/is_special_member_function1.C: New test.
	* g++.dg/reflect/is_static_member1.C: New test.
	* g++.dg/reflect/is_string_literal1.C: New test.
	* g++.dg/reflect/is_structured_binding1.C: New test.
	* g++.dg/reflect/is_structured_binding2.C: New test.
	* g++.dg/reflect/is_template1.C: New test.
	* g++.dg/reflect/is_template2.C: New test.
	* g++.dg/reflect/is_type1.C: New test.
	* g++.dg/reflect/is_type_alias1.C: New test.
	* g++.dg/reflect/is_type_alias2.C: New test.
	* g++.dg/reflect/is_type_alias3.C: New test.
	* g++.dg/reflect/is_user_declared1.C: New test.
	* g++.dg/reflect/is_user_declared2.C: New test.
	* g++.dg/reflect/is_user_provided1.C: New test.
	* g++.dg/reflect/is_user_provided2.C: New test.
	* g++.dg/reflect/is_variable1.C: New test.
	* g++.dg/reflect/is_variable_template1.C: New test.
	* g++.dg/reflect/is_virtual1.C: New test.
	* g++.dg/reflect/is_volatile1.C: New test.
	* g++.dg/reflect/lex1.C: New test.
	* g++.dg/reflect/lex2.C: New test.
	* g++.dg/reflect/mangle1.C: New test.
	* g++.dg/reflect/member-visibility1.C: New test.
	* g++.dg/reflect/member-visibility2.C: New test.
	* g++.dg/reflect/member1.C: New test.
	* g++.dg/reflect/member10.C: New test.
	* g++.dg/reflect/member11.C: New test.
	* g++.dg/reflect/member12.C: New test.
	* g++.dg/reflect/member13.C: New test.
	* g++.dg/reflect/member14.C: New test.
	* g++.dg/reflect/member15.C: New test.
	* g++.dg/reflect/member16.C: New test.
	* g++.dg/reflect/member17.C: New test.
	* g++.dg/reflect/member18.C: New test.
	* g++.dg/reflect/member19.C: New test.
	* g++.dg/reflect/member2.C: New test.
	* g++.dg/reflect/member20.C: New test.
	* g++.dg/reflect/member3.C: New test.
	* g++.dg/reflect/member4.C: New test.
	* g++.dg/reflect/member5.C: New test.
	* g++.dg/reflect/member6.C: New test.
	* g++.dg/reflect/member7.C: New test.
	* g++.dg/reflect/member8.C: New test.
	* g++.dg/reflect/member9.C: New test.
	* g++.dg/reflect/members_of1.C: New test.
	* g++.dg/reflect/members_of2.C: New test.
	* g++.dg/reflect/members_of3.C: New test.
	* g++.dg/reflect/members_of4.C: New test.
	* g++.dg/reflect/members_of5.C: New test.
	* g++.dg/reflect/members_of6.C: New test.
	* g++.dg/reflect/members_of7.C: New test.
	* g++.dg/reflect/metafn-ptr1.C: New test.
	* g++.dg/reflect/ns1.C: New test.
	* g++.dg/reflect/ns2.C: New test.
	* g++.dg/reflect/ns3.C: New test.
	* g++.dg/reflect/ns4.C: New test.
	* g++.dg/reflect/ns5.C: New test.
	* g++.dg/reflect/ns6.C: New test.
	* g++.dg/reflect/null1.C: New test.
	* g++.dg/reflect/null2.C: New test.
	* g++.dg/reflect/null3.C: New test.
	* g++.dg/reflect/null4.C: New test.
	* g++.dg/reflect/null5.C: New test.
	* g++.dg/reflect/object_of1.C: New test.
	* g++.dg/reflect/object_of2.C: New test.
	* g++.dg/reflect/odr1.C: New test.
	* g++.dg/reflect/offset_of1.C: New test.
	* g++.dg/reflect/operator_of1.C: New test.
	* g++.dg/reflect/override1.C: New test.
	* g++.dg/reflect/p2996-1.C: New test.
	* g++.dg/reflect/p2996-10.C: New test.
	* g++.dg/reflect/p2996-11.C: New test.
	* g++.dg/reflect/p2996-12.C: New test.
	* g++.dg/reflect/p2996-13.C: New test.
	* g++.dg/reflect/p2996-14.C: New test.
	* g++.dg/reflect/p2996-15.C: New test.
	* g++.dg/reflect/p2996-16.C: New test.
	* g++.dg/reflect/p2996-17.C: New test.
	* g++.dg/reflect/p2996-18.C: New test.
	* g++.dg/reflect/p2996-19.C: New test.
	* g++.dg/reflect/p2996-2.C: New test.
	* g++.dg/reflect/p2996-20.C: New test.
	* g++.dg/reflect/p2996-21.C: New test.
	* g++.dg/reflect/p2996-3.C: New test.
	* g++.dg/reflect/p2996-4.C: New test.
	* g++.dg/reflect/p2996-5.C: New test.
	* g++.dg/reflect/p2996-6.C: New test.
	* g++.dg/reflect/p2996-7.C: New test.
	* g++.dg/reflect/p2996-8.C: New test.
	* g++.dg/reflect/p2996-9.C: New test.
	* g++.dg/reflect/p3394-1.C: New test.
	* g++.dg/reflect/p3491-1.C: New test.
	* g++.dg/reflect/p3491-2.C: New test.
	* g++.dg/reflect/p3491-3.C: New test.
	* g++.dg/reflect/pack-index1.C: New test.
	* g++.dg/reflect/parameters_of1.C: New test.
	* g++.dg/reflect/parameters_of2.C: New test.
	* g++.dg/reflect/parameters_of3.C: New test.
	* g++.dg/reflect/parameters_of4.C: New test.
	* g++.dg/reflect/parameters_of5.C: New test.
	* g++.dg/reflect/parameters_of6.C: New test.
	* g++.dg/reflect/parent_of1.C: New test.
	* g++.dg/reflect/parm1.C: New test.
	* g++.dg/reflect/parm2.C: New test.
	* g++.dg/reflect/parm3.C: New test.
	* g++.dg/reflect/parm4.C: New test.
	* g++.dg/reflect/pr122634-1.C: New test.
	* g++.dg/reflect/pr122634-2.C: New test.
	* g++.dg/reflect/qrn1.C: New test.
	* g++.dg/reflect/qrn2.C: New test.
	* g++.dg/reflect/range_args.C: New test.
	* g++.dg/reflect/reflect_constant1.C: New test.
	* g++.dg/reflect/reflect_constant2.C: New test.
	* g++.dg/reflect/reflect_constant3.C: New test.
	* g++.dg/reflect/reflect_constant4.C: New test.
	* g++.dg/reflect/reflect_constant5.C: New test.
	* g++.dg/reflect/reflect_constant6.C: New test.
	* g++.dg/reflect/reflect_constant7.C: New test.
	* g++.dg/reflect/reflect_constant8.C: New test.
	* g++.dg/reflect/reflect_constant9.C: New test.
	* g++.dg/reflect/reflect_constant_array1.C: New test.
	* g++.dg/reflect/reflect_constant_array2.C: New test.
	* g++.dg/reflect/reflect_constant_array3.C: New test.
	* g++.dg/reflect/reflect_constant_array4.C: New test.
	* g++.dg/reflect/reflect_constant_string1.C: New test.
	* g++.dg/reflect/reflect_constant_string2.C: New test.
	* g++.dg/reflect/reflect_function1.C: New test.
	* g++.dg/reflect/reflect_function2.C: New test.
	* g++.dg/reflect/reflect_object1.C: New test.
	* g++.dg/reflect/reflect_object2.C: New test.
	* g++.dg/reflect/reflect_object3.C: New test.
	* g++.dg/reflect/reflect_object4.C: New test.
	* g++.dg/reflect/return_type_of1.C: New test.
	* g++.dg/reflect/return_type_of2.C: New test.
	* g++.dg/reflect/serialize1.C: New test.
	* g++.dg/reflect/serialize2.C: New test.
	* g++.dg/reflect/size_of1.C: New test.
	* g++.dg/reflect/source_location_of1.C: New test.
	* g++.dg/reflect/source_location_of2.C: New test.
	* g++.dg/reflect/splice1.C: New test.
	* g++.dg/reflect/splice2.C: New test.
	* g++.dg/reflect/splice3.C: New test.
	* g++.dg/reflect/splice4.C: New test.
	* g++.dg/reflect/splice5.C: New test.
	* g++.dg/reflect/splice6.C: New test.
	* g++.dg/reflect/splice7.C: New test.
	* g++.dg/reflect/splicing-base1.C: New test.
	* g++.dg/reflect/splicing-base2.C: New test.
	* g++.dg/reflect/splicing-base3.C: New test.
	* g++.dg/reflect/splicing-base4.C: New test.
	* g++.dg/reflect/storage_duration1.C: New test.
	* g++.dg/reflect/storage_duration2.C: New test.
	* g++.dg/reflect/storage_duration3.C: New test.
	* g++.dg/reflect/subobjects_of1.C: New test.
	* g++.dg/reflect/substitute1.C: New test.
	* g++.dg/reflect/substitute2.C: New test.
	* g++.dg/reflect/symbol_of1.C: New test.
	* g++.dg/reflect/symbol_of2.C: New test.
	* g++.dg/reflect/template_arguments_of1.C: New test.
	* g++.dg/reflect/template_arguments_of2.C: New test.
	* g++.dg/reflect/template_arguments_of3.C: New test.
	* g++.dg/reflect/template_of1.C: New test.
	* g++.dg/reflect/template_of2.C: New test.
	* g++.dg/reflect/template_of3.C: New test.
	* g++.dg/reflect/tuple1.C: New test.
	* g++.dg/reflect/tuple2.C: New test.
	* g++.dg/reflect/type1.C: New test.
	* g++.dg/reflect/type10.C: New test.
	* g++.dg/reflect/type2.C: New test.
	* g++.dg/reflect/type3.C: New test.
	* g++.dg/reflect/type4.C: New test.
	* g++.dg/reflect/type5.C: New test.
	* g++.dg/reflect/type6.C: New test.
	* g++.dg/reflect/type7.C: New test.
	* g++.dg/reflect/type8.C: New test.
	* g++.dg/reflect/type9.C: New test.
	* g++.dg/reflect/type_of1.C: New test.
	* g++.dg/reflect/type_of2.C: New test.
	* g++.dg/reflect/type_rels1.C: New test.
	* g++.dg/reflect/type_trait1.C: New test.
	* g++.dg/reflect/type_trait10.C: New test.
	* g++.dg/reflect/type_trait11.C: New test.
	* g++.dg/reflect/type_trait12.C: New test.
	* g++.dg/reflect/type_trait13.C: New test.
	* g++.dg/reflect/type_trait2.C: New test.
	* g++.dg/reflect/type_trait3.C: New test.
	* g++.dg/reflect/type_trait4.C: New test.
	* g++.dg/reflect/type_trait5.C: New test.
	* g++.dg/reflect/type_trait6.C: New test.
	* g++.dg/reflect/type_trait8.C: New test.
	* g++.dg/reflect/type_trait9.C: New test.
	* g++.dg/reflect/u8display_string_of1.C: New test.
	* g++.dg/reflect/u8identifier_of1.C: New test.
	* g++.dg/reflect/u8symbol_of1.C: New test.
	* g++.dg/reflect/underlying_type1.C: New test.
	* g++.dg/reflect/using1.C: New test.
	* g++.dg/reflect/value_or_object1.C: New test.
	* g++.dg/reflect/variable_of1.C: New test.
	* g++.dg/reflect/variable_of2.C: New test.
	* g++.dg/reflect/variable_of3.C: New test.
	* g++.dg/reflect/variant1.C: New test.
	* g++.dg/reflect/variant2.C: New test.
	* g++.dg/reflect/vector1.C: New test.
	* g++.dg/reflect/visibility1.C: New test.

Co-authored-by: Jakub Jelinek <jakub@redhat.com>
Signed-off-by: Valentyn Yukhymenko <vyuhimenko@bloomberg.net>
Signed-off-by: Alex Yesmanchyk <ayesmanchyk@bloomberg.net>
Signed-off-by: Michael Levine <mlevine55@bloomberg.net>
Reviewed-by: Jason Merrill <jason@redhat.com>
2026-01-15 10:17:43 -05:00

2287 lines
33 KiB
C++

// Feature test macro definitions -*- C++ -*-
// Copyright (C) 2023-2026 Free Software Foundation, Inc.
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
AutoGen Definitions version.tpl;
// The top level variable ftms is an array of feature test macros. Each entry
// consists of a structure like following:
// Schema:
// ftms = {
// name = FTM NAME;
// [stdname = FTM STANDARD MACRO NAME;]
// [no_stdname = true;]
// values = {
// v = VALUE FOR FTM IF MATCHING;
// [extra_cond = STRING;]
// [cxxmin = NUMBER;]
// [gnuxxmin = NUMBER;]
// [gthread = yes|no;]
// [hosted = yes|no;]
// [cxx11abi = yes|no;]
// }; ...
// };
// The elements in square brackets are optional. These are formulated into a
// logical expression like:
// ((strict && c++ >= cxxmin) || (!strict && c++ >= gnuxxmin))
// && (gthr <=> gthread)
// && (host <=> hosted)
// && (cxx11 <=> cxx11abi)
// && (extra_cond)
// Where gthr, cxx11 and host are _GLIBCXX_HAS_GTHREADS, _GLIBCXX_USE_CXX11_ABI
// and _GLIBCXX_HOSTED respectively. If any of these are omitted, their
// sub-expressions are equivalent to the identity. Specially, if gnuxxmin is
// omitted, it is taken to be the value of cxxmin, and so, only if both are
// omitted, the clause is omitted.
// stdname configures the name of the *standard* macro emitted, i.e. it
// replaces only the __cpp_lib_ macro in the emitted definition. Defaults to
// __cpp_lib_${name}. If no_stdname exists (with any value), the stdname
// define is not emitted.
// N.B This list needs to be in topological sort order, as later entries in
// this list can and do use the earlier entries.
ftms = {
name = incomplete_container_elements;
values = {
v = 201505;
hosted = yes;
};
};
ftms = {
name = uncaught_exceptions;
values = {
v = 201411;
cxxmin = 17;
gnuxxmin = 03;
};
};
ftms = {
name = allocator_traits_is_always_equal;
values = {
v = 201411;
cxxmin = 11;
};
};
ftms = {
name = is_null_pointer;
values = {
v = 201309;
cxxmin = 11;
};
};
ftms = {
name = result_of_sfinae;
values = {
v = 201210;
cxxmin = 11;
};
};
ftms = {
name = shared_ptr_arrays;
values = {
v = 201707;
cxxmin = 20;
hosted = yes;
};
values = {
v = 201611;
cxxmin = 11;
hosted = yes;
};
};
ftms = {
name = is_swappable;
values = {
v = 201603;
cxxmin = 17;
gnuxxmin = 11;
};
};
ftms = {
name = void_t;
values = {
v = 201411;
cxxmin = 17;
gnuxxmin = 11;
};
};
ftms = {
name = enable_shared_from_this;
values = {
v = 201603;
cxxmin = 17;
gnuxxmin = 11;
hosted = yes;
};
};
ftms = {
name = math_spec_funcs;
stdname = "__STDCPP_MATH_SPEC_FUNCS__";
values = {
v = 201003;
cxxmin = 11;
};
};
ftms = {
name = coroutine;
values = {
v = 201902;
// It is very likely that earlier versions would work, but they are
// untested.
cxxmin = 14;
extra_cond = "__cpp_impl_coroutine";
};
};
ftms = {
name = exchange_function;
values = {
v = 201304;
cxxmin = 14;
};
};
ftms = {
name = integer_sequence;
values = {
v = 201304;
cxxmin = 14;
};
};
ftms = {
name = integral_constant_callable;
values = {
v = 201304;
cxxmin = 14;
};
};
ftms = {
name = is_final;
values = {
v = 201402;
cxxmin = 14;
};
};
ftms = {
name = make_reverse_iterator;
values = {
v = 201402;
cxxmin = 14;
};
};
ftms = {
name = null_iterators;
values = {
v = 201304;
cxxmin = 14;
};
};
ftms = {
name = transformation_trait_aliases;
values = {
v = 201304;
cxxmin = 14;
};
};
ftms = {
name = transparent_operators;
values = {
v = 201510;
cxxmin = 14;
};
};
ftms = {
name = tuple_element_t;
values = {
v = 201402;
cxxmin = 14;
};
};
ftms = {
name = tuples_by_type;
values = {
v = 201304;
cxxmin = 14;
};
};
ftms = {
name = robust_nonmodifying_seq_ops;
values = {
v = 201304;
cxxmin = 14;
};
};
ftms = {
name = to_chars;
values = {
v = 202306;
cxxmin = 26;
extra_cond = "_GLIBCXX_FLOAT_IS_IEEE_BINARY32 "
"&& _GLIBCXX_DOUBLE_IS_IEEE_BINARY64 "
"&& __SIZE_WIDTH__ >= 32";
};
values = {
v = 201611;
cxxmin = 14;
extra_cond = "_GLIBCXX_FLOAT_IS_IEEE_BINARY32 "
"&& _GLIBCXX_DOUBLE_IS_IEEE_BINARY64 "
"&& __SIZE_WIDTH__ >= 32";
};
};
ftms = {
name = chrono_udls;
values = {
v = 201304;
cxxmin = 14;
};
};
ftms = {
name = complex_udls;
values = {
v = 201309;
cxxmin = 14;
hosted = yes;
};
};
ftms = {
name = generic_associative_lookup;
values = {
v = 201304;
cxxmin = 14;
hosted = yes;
};
};
ftms = {
name = make_unique;
values = {
v = 201304;
cxxmin = 14;
hosted = yes;
};
};
ftms = {
name = quoted_string_io;
values = {
v = 201304;
cxxmin = 14;
hosted = yes;
};
};
ftms = {
name = shared_timed_mutex;
values = {
v = 201402;
cxxmin = 14;
hosted = yes;
gthread = yes;
};
};
ftms = {
name = string_udls;
values = {
v = 201304;
cxxmin = 14;
hosted = yes;
};
};
ftms = {
name = addressof_constexpr;
values = {
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 2296. std::addressof should be constexpr
v = 201603;
cxxmin = 17;
};
};
ftms = {
name = any;
values = {
v = 201606;
cxxmin = 17;
};
};
ftms = {
name = apply;
values = {
v = 201603;
cxxmin = 17;
};
};
ftms = {
name = as_const;
values = {
v = 201510;
cxxmin = 17;
};
};
ftms = {
name = atomic_is_always_lock_free;
values = {
v = 201603;
cxxmin = 17;
};
};
ftms = {
name = bool_constant;
values = {
v = 201505;
cxxmin = 17;
};
};
ftms = {
name = byte;
values = {
v = 201603;
cxxmin = 17;
};
};
ftms = {
name = constant_wrapper;
values = {
v = 202506;
cxxmin = 26;
};
};
ftms = {
name = has_unique_object_representations;
values = {
v = 201606;
cxxmin = 17;
extra_cond = "defined(_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP)";
};
};
ftms = {
name = hardware_interference_size;
values = {
v = 201703;
cxxmin = 17;
extra_cond = "defined(__GCC_DESTRUCTIVE_SIZE)";
};
};
ftms = {
name = invoke;
values = {
v = 201411;
cxxmin = 17;
};
};
ftms = {
name = is_aggregate;
values = {
v = 201703;
cxxmin = 17;
extra_cond = "defined(_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE)";
};
};
ftms = {
name = is_invocable;
values = {
v = 201703;
cxxmin = 17;
};
};
ftms = {
name = launder;
values = {
v = 201606;
cxxmin = 17;
extra_cond = "defined(_GLIBCXX_HAVE_BUILTIN_LAUNDER)";
};
};
ftms = {
name = logical_traits;
values = {
v = 201510;
cxxmin = 17;
};
};
ftms = {
name = make_from_tuple;
values = {
v = 201606;
cxxmin = 17;
};
};
ftms = {
name = not_fn;
values = {
v = 202306;
cxxmin = 26;
};
values = {
v = 201603;
cxxmin = 17;
};
};
ftms = {
name = type_trait_variable_templates;
values = {
v = 201510;
cxxmin = 17;
};
};
ftms = {
name = variant;
values = {
v = 202306;
cxxmin = 26;
extra_cond = "__cpp_concepts >= 202002L && __cpp_constexpr >= 201811L && __cpp_explicit_this_parameter";
};
values = {
v = 202106;
cxxmin = 20;
extra_cond = "__cpp_concepts >= 202002L && __cpp_constexpr >= 201811L";
};
values = {
v = 202102;
cxxmin = 17;
};
};
ftms = {
// Used in earlier draft of SD6.
name = lcm;
values = {
v = 201606;
cxxmin = 17;
};
};
ftms = {
// Used in earlier draft of SD6.
name = gcd;
values = {
v = 201606;
cxxmin = 17;
};
};
ftms = {
name = gcd_lcm;
values = {
v = 201606;
cxxmin = 17;
};
};
ftms = {
name = raw_memory_algorithms;
values = {
v = 202411;
cxxmin = 26;
extra_cond = "__cpp_constexpr >= 202406L";
};
values = {
v = 201606;
cxxmin = 17;
};
};
ftms = {
name = array_constexpr;
values = {
v = 201811;
cxxmin = 20;
};
values = {
v = 201803;
cxxmin = 17;
};
};
ftms = {
name = nonmember_container_access;
values = {
v = 201411;
cxxmin = 17;
};
};
ftms = {
name = clamp;
values = {
v = 201603;
cxxmin = 17;
};
};
ftms = {
name = sample;
values = {
v = 201603;
cxxmin = 17;
};
};
ftms = {
name = boyer_moore_searcher;
values = {
v = 201603;
cxxmin = 17;
hosted = yes;
};
};
ftms = {
name = chrono;
values = {
v = 202306;
cxxmin = 26;
hosted = yes;
cxx11abi = yes;
};
values = {
v = 201907;
cxxmin = 20;
hosted = yes;
cxx11abi = yes; // std::chrono::tzdb requires cxx11 std::string
};
values = {
v = 201611;
cxxmin = 17;
hosted = yes;
};
};
ftms = {
// Unofficial macro for chrono features supported for old string ABI.
name = chrono_cxx20;
values = {
v = 202306;
cxxmin = 26;
no_stdname = yes;
};
values = {
v = 201800;
cxxmin = 20;
no_stdname = yes;
};
};
ftms = {
name = execution;
values = {
v = 201902; // FIXME: should be 201603L
cxxmin = 17;
hosted = yes;
};
};
ftms = {
name = filesystem;
values = {
v = 201703;
cxxmin = 17;
hosted = yes;
};
};
ftms = {
name = hypot;
values = {
v = 201603;
cxxmin = 17;
hosted = yes;
};
};
ftms = {
name = map_try_emplace;
values = {
v = 201411;
cxxmin = 17;
hosted = yes;
};
};
ftms = {
name = math_special_functions;
values = {
v = 201603;
cxxmin = 17;
hosted = yes;
};
};
ftms = {
name = memory_resource;
values = {
v = 201603;
cxxmin = 17;
hosted = yes;
gthread = yes;
};
values = {
v = 1;
// For when there is no gthread.
cxxmin = 17;
hosted = yes;
gthread = no;
};
};
ftms = {
name = node_extract;
values = {
v = 201606;
cxxmin = 17;
hosted = yes;
};
};
ftms = {
name = parallel_algorithm;
values = {
v = 201603;
cxxmin = 17;
hosted = yes;
};
};
ftms = {
name = scoped_lock;
values = {
v = 201703;
cxxmin = 17;
};
};
ftms = {
name = shared_mutex;
values = {
v = 201505;
cxxmin = 17;
hosted = yes;
gthread = yes;
};
};
ftms = {
name = shared_ptr_weak_type;
values = {
v = 201606;
cxxmin = 17;
hosted = yes;
};
};
ftms = {
name = string_view;
values = {
v = 202403;
cxxmin = 26;
hosted = yes;
};
values = {
v = 201803;
cxxmin = 17;
hosted = yes;
};
};
ftms = {
name = unordered_map_try_emplace;
values = {
v = 201411;
cxxmin = 17;
hosted = yes;
};
};
ftms = {
name = assume_aligned;
values = {
v = 201811;
cxxmin = 20;
};
};
ftms = {
name = is_sufficiently_aligned;
values = {
v = 202411;
cxxmin = 26;
};
};
ftms = {
name = atomic_flag_test;
values = {
v = 201907;
cxxmin = 20;
};
};
ftms = {
name = atomic_float;
values = {
v = 201711;
cxxmin = 20;
};
};
ftms = {
name = atomic_lock_free_type_aliases;
values = {
v = 201907;
cxxmin = 20;
extra_cond = "(__GCC_ATOMIC_INT_LOCK_FREE | __GCC_ATOMIC_LONG_LOCK_FREE | __GCC_ATOMIC_CHAR_LOCK_FREE) & 2";
};
};
ftms = {
name = atomic_ref;
values = {
v = 202411;
cxxmin = 26;
};
values = {
v = 201806;
cxxmin = 20;
};
};
ftms = {
name = atomic_value_initialization;
values = {
v = 201911;
cxxmin = 20;
extra_cond = "__cpp_concepts >= 201907L";
};
};
ftms = {
name = bind_front;
values = {
v = 202306;
cxxmin = 26;
};
values = {
v = 201907;
cxxmin = 20;
};
};
ftms = {
name = bind_back;
values = {
v = 202306;
cxxmin = 26;
};
values = {
v = 202202;
cxxmin = 23;
extra_cond = "__cpp_explicit_this_parameter";
};
};
ftms = {
name = starts_ends_with;
values = {
v = 201711;
cxxmin = 20;
};
};
ftms = {
name = bit_cast;
values = {
v = 201806;
cxxmin = 20;
extra_cond = "__has_builtin(__builtin_bit_cast)";
};
};
ftms = {
name = bitops;
values = {
v = 201907;
cxxmin = 20;
};
};
ftms = {
name = bounded_array_traits;
values = {
v = 201902;
cxxmin = 20;
};
};
ftms = {
name = concepts;
// 201806 P0898R3 Standard Library Concepts
// 201907 P1754R1 Rename concepts to standard_case for C++20
// 202002 P1964R2 Wording for boolean-testable
// 202207 P2404R3 Move-only types for equality_comparable_with, etc.
values = {
v = 202207;
cxxmin = 20;
extra_cond = "__cpp_concepts >= 201907L";
};
};
// Moved down here (after concepts) by topological sort.
ftms = {
name = optional;
values = { // optional<T&>
v = 202506;
cxxmin = 26;
extra_cond = "__glibcxx_concepts";
};
values = { // monadic operations
v = 202110;
cxxmin = 23;
extra_cond = "__glibcxx_concepts";
};
values = { // full constexpr support
v = 202106;
cxxmin = 20;
};
values = {
v = 201606;
cxxmin = 17;
};
};
ftms = {
name = optional_range_support;
values = {
v = 202406;
cxxmin = 26;
};
};
ftms = {
name = destroying_delete;
values = {
v = 201806;
cxxmin = 20;
extra_cond = "__cpp_impl_destroying_delete";
};
};
ftms = {
name = constexpr_string_view;
values = {
v = 201811;
cxxmin = 20;
};
};
ftms = {
name = endian;
values = {
v = 201907;
cxxmin = 20;
};
};
ftms = {
name = int_pow2;
values = {
v = 202002;
cxxmin = 20;
};
};
ftms = {
name = integer_comparison_functions;
values = {
v = 202002;
cxxmin = 20;
};
};
ftms = {
name = is_constant_evaluated;
values = {
v = 201811;
cxxmin = 20;
extra_cond = "defined(_GLIBCXX_HAVE_IS_CONSTANT_EVALUATED)";
};
};
// Moved down here (after is_constant_evaluated) by topological sort.
ftms = {
name = constexpr_char_traits;
values = {
// Unofficial macro indicating P1032R1 support in C++20
v = 201811;
cxxmin = 20;
extra_cond = "defined(__glibcxx_is_constant_evaluated)";
};
values = {
// Unofficial macro indicating P0426R1 support in C++17
v = 201611;
cxxmin = 17;
extra_cond = "_GLIBCXX_HAVE_IS_CONSTANT_EVALUATED";
};
};
ftms = {
name = is_layout_compatible;
values = {
v = 201907;
cxxmin = 20;
extra_cond = "__has_builtin(__is_layout_compatible) "
"&& __has_builtin(__builtin_is_corresponding_member)";
};
};
ftms = {
name = is_nothrow_convertible;
values = {
v = 201806;
cxxmin = 20;
};
};
ftms = {
name = is_pointer_interconvertible;
values = {
v = 201907;
cxxmin = 20;
extra_cond =
"__has_builtin(__is_pointer_interconvertible_base_of) "
"&& __has_builtin(__builtin_is_pointer_interconvertible_with_class)";
};
};
ftms = {
name = math_constants;
values = {
v = 201907;
cxxmin = 20;
};
};
ftms = {
name = make_obj_using_allocator;
no_stdname = true;
values = {
// Not specified by C++20, used internally
v = 201811;
cxxmin = 20;
extra_cond = "__cpp_concepts";
};
};
ftms = {
name = remove_cvref;
values = {
v = 201711;
cxxmin = 20;
};
};
ftms = {
name = source_location;
values = {
v = 201907;
cxxmin = 20;
extra_cond = "__has_builtin(__builtin_source_location)";
};
};
ftms = {
name = span;
values = {
v = 202311;
cxxmin = 26;
extra_cond = "__glibcxx_concepts";
};
values = {
v = 202002;
cxxmin = 20;
extra_cond = "__glibcxx_concepts";
};
};
ftms = {
name = mdspan;
values = {
v = 202406;
cxxmin = 26;
};
values = {
v = 202207;
cxxmin = 23;
};
};
ftms = {
name = aligned_accessor;
values = {
v = 202411;
cxxmin = 26;
extra_cond = "__glibcxx_assume_aligned "
"&& __glibcxx_is_sufficiently_aligned";
};
};
// Purely internal macro padded layouts.
ftms = {
name = padded_layouts;
no_stdname = true; // internal
values = {
v = 202403;
cxxmin = 26;
};
};
ftms = {
name = submdspan;
values = {
v = 202411;
cxxmin = 26;
extra_cond = "__glibcxx_constant_wrapper >= 202506L";
};
};
ftms = {
name = ssize;
values = {
v = 201902;
cxxmin = 20;
};
};
ftms = {
name = three_way_comparison;
values = {
v = 201907;
cxxmin = 20;
extra_cond = "__cpp_impl_three_way_comparison >= 201907L "
"&& __glibcxx_concepts";
};
};
ftms = {
name = to_address;
values = {
v = 201711;
cxxmin = 20;
};
};
ftms = {
name = to_array;
values = {
v = 201907;
cxxmin = 20;
extra_cond = "__cpp_generic_lambdas >= 201707L";
};
};
ftms = {
name = type_identity;
values = {
v = 201806;
cxxmin = 20;
};
};
ftms = {
name = unwrap_ref;
values = {
v = 201811;
cxxmin = 20;
};
};
ftms = {
name = constexpr_iterator;
values = {
v = 201811;
cxxmin = 20;
};
};
ftms = {
name = interpolate;
values = {
v = 201902;
cxxmin = 20;
};
};
ftms = {
name = constexpr_utility;
values = {
v = 201811;
cxxmin = 20;
};
};
ftms = {
name = shift;
values = {
v = 202202;
cxxmin = 23;
};
values = {
v = 201806;
cxxmin = 20;
};
};
ftms = {
name = ranges;
values = {
v = 202406;
cxxmin = 26;
extra_cond = "__glibcxx_concepts";
};
values = {
v = 202302;
cxxmin = 23;
extra_cond = "__glibcxx_concepts";
};
values = {
v = 202110;
cxxmin = 20;
extra_cond = "__glibcxx_concepts";
};
};
ftms = {
name = constexpr_numeric;
values = {
v = 201911;
cxxmin = 20;
};
};
ftms = {
name = constexpr_functional;
values = {
v = 201907;
cxxmin = 20;
};
};
ftms = {
name = constexpr_algorithms;
values = {
v = 202306;
cxxmin = 26;
};
values = {
v = 201806;
cxxmin = 20;
};
};
ftms = {
name = constexpr_tuple;
values = {
v = 201811;
cxxmin = 20;
};
};
ftms = {
name = constexpr_memory;
values = {
v = 202202;
cxxmin = 23;
extra_cond = "__cpp_constexpr_dynamic_alloc";
};
values = {
v = 201811;
cxxmin = 20;
};
};
ftms = {
name = atomic_shared_ptr;
values = {
v = 201711;
cxxmin = 20;
hosted = yes;
};
};
ftms = {
name = atomic_wait;
// atomic_wait is available if either futexes or gthread are.
values = {
v = 201907;
cxxmin = 20;
hosted = yes;
gthread = yes;
};
values = {
v = 201907;
cxxmin = 20;
hosted = yes;
gthread = no;
extra_cond = "defined(_GLIBCXX_HAVE_LINUX_FUTEX)";
};
};
ftms = {
name = barrier;
values = {
v = 201907;
cxxmin = 20;
// This condition carries in the hosted&&(futex||gthread) logic from above.
extra_cond = "__cpp_aligned_new && __glibcxx_atomic_wait";
};
};
ftms = {
name = format;
// 202305 P2757R3 Type checking format args
// 202306 P2637R3 Member visit
// 202311 P2918R2 Runtime format strings II
values = {
v = 202311;
cxxmin = 26;
hosted = yes;
};
// 201907 Text Formatting, Integration of chrono, printf corner cases.
// 202106 std::format improvements.
// 202110 Fixing locale handling in chrono formatters, generator-like types.
// 202207 Encodings in localized formatting of chrono, basic-format-string.
// 202304 P2510R3 Formatting pointers
values = {
v = 202304;
cxxmin = 20;
hosted = yes;
};
};
ftms = {
name = format_uchar;
values = {
v = 202311;
cxxmin = 20;
hosted = yes;
};
};
// FIXME: #define __glibcxx_execution 201902L
ftms = {
name = constexpr_complex;
values = {
v = 201711;
cxxmin = 20;
hosted = yes;
};
};
ftms = {
name = constexpr_dynamic_alloc;
values = {
v = 201907;
cxxmin = 20;
hosted = yes;
};
};
ftms = {
name = constexpr_flat_map;
values = {
v = 202502;
cxxmin = 26;
};
};
ftms = {
name = constexpr_flat_set;
values = {
v = 202502;
cxxmin = 26;
};
};
ftms = {
name = constexpr_string;
values = {
v = 201907;
cxxmin = 20;
hosted = yes;
cxx11abi = yes;
extra_cond = "defined(__glibcxx_is_constant_evaluated)";
};
values = {
v = 201811;
cxxmin = 20;
hosted = yes;
cxx11abi = no;
extra_cond = "defined(__glibcxx_is_constant_evaluated)";
};
values = {
v = 201611;
cxxmin = 17;
hosted = yes;
extra_cond = "_GLIBCXX_HAVE_IS_CONSTANT_EVALUATED";
};
};
ftms = {
name = constexpr_vector;
values = {
v = 201907;
cxxmin = 20;
hosted = yes;
};
};
ftms = {
name = constrained_equality;
values = {
v = 202411;
cxxmin = 23;
extra_cond = "__glibcxx_three_way_comparison";
};
values = {
v = 202403;
cxxmin = 20;
extra_cond = "__glibcxx_three_way_comparison";
};
};
ftms = {
name = erase_if;
values = {
v = 202002;
cxxmin = 20;
hosted = yes;
};
};
ftms = {
name = generic_unordered_lookup;
values = {
v = 201811;
cxxmin = 20;
hosted = yes;
};
};
ftms = {
name = jthread;
values = {
v = 201911;
gthread = yes;
hosted = yes;
cxxmin = 20;
};
};
ftms = {
name = latch;
values = {
v = 201907;
cxxmin = 20;
extra_cond = "__glibcxx_atomic_wait";
};
};
ftms = {
name = list_remove_return_type;
values = {
v = 201806;
cxxmin = 20;
hosted = yes;
};
};
ftms = {
name = polymorphic_allocator;
values = {
v = 201902;
cxxmin = 20;
hosted = yes;
};
};
ftms = {
name = move_iterator_concept;
values = {
v = 202207;
// This is P2520R0, a C++23 change, but we treat it as a DR against C++20.
cxxmin = 20;
extra_cond = "__glibcxx_concepts";
};
};
ftms = {
name = semaphore;
values = {
v = 201907;
cxxmin = 20;
hosted = yes;
extra_cond = "__glibcxx_atomic_wait";
};
};
ftms = {
name = smart_ptr_for_overwrite;
values = {
v = 202002;
cxxmin = 20;
hosted = yes;
};
};
ftms = {
name = syncbuf;
values = {
v = 201803;
cxxmin = 20;
hosted = yes;
cxx11abi = yes;
};
};
ftms = {
name = byteswap;
values = {
v = 202110;
cxxmin = 23;
};
};
ftms = {
name = constexpr_charconv;
values = {
v = 202207;
cxxmin = 23;
};
};
ftms = {
name = constexpr_typeinfo;
values = {
v = 202106;
cxxmin = 23;
};
};
ftms = {
name = expected;
values = {
v = 202211;
cxxmin = 23;
extra_cond = "__cpp_concepts >= 202002L";
};
};
ftms = {
name = format_ranges;
// 202207 P2286R8 Formatting Ranges
// 202207 P2585R1 Improving default container formatting
// LWG3750 Too many papers bump __cpp_lib_format
values = {
v = 202207;
cxxmin = 23;
hosted = yes;
};
};
ftms = {
name = freestanding_algorithm;
values = {
v = 202311;
// This is a C++26 feature, but we support it in C++23.
cxxmin = 23;
};
};
ftms = {
name = freestanding_array;
values = {
v = 202311;
// This is a C++26 feature, but we support it in C++23.
cxxmin = 23;
};
};
ftms = {
name = freestanding_cstring;
values = {
v = 202311;
// This is a C++26 feature, but we support it in C++23.
cxxmin = 23;
};
};
ftms = {
name = freestanding_expected;
values = {
v = 202311;
cxxmin = 23;
// This is a C++26 feature, but we support it in C++23.
extra_cond = "__cpp_lib_expected";
};
};
ftms = {
name = freestanding_optional;
values = {
v = 202311;
// This is a C++26 feature, but we support it in C++23.
cxxmin = 23;
};
};
ftms = {
name = freestanding_string_view;
values = {
v = 202311;
// This is a C++26 feature, but we support it in C++23.
cxxmin = 23;
};
};
ftms = {
name = freestanding_variant;
values = {
v = 202311;
// This is a C++26 feature, but we support it in C++23.
cxxmin = 23;
};
};
ftms = {
name = invoke_r;
values = {
v = 202106;
cxxmin = 23;
};
};
ftms = {
name = is_scoped_enum;
values = {
v = 202011;
cxxmin = 23;
};
};
ftms = {
name = reference_from_temporary;
values = {
v = 202202;
extra_cond =
"__has_builtin(__reference_constructs_from_temporary) "
"&& __has_builtin(__reference_converts_from_temporary)";
cxxmin = 23;
};
};
ftms = {
name = containers_ranges;
values = {
v = 202202;
cxxmin = 23;
hosted = yes;
};
};
ftms = {
name = ranges_to_container;
values = {
v = 202202;
cxxmin = 23;
hosted = yes;
};
};
ftms = {
name = ranges_zip;
values = {
v = 202110;
cxxmin = 23;
};
};
ftms = {
name = ranges_chunk;
values = {
v = 202202;
cxxmin = 23;
};
};
ftms = {
name = ranges_slide;
values = {
v = 202202;
cxxmin = 23;
};
};
ftms = {
name = ranges_chunk_by;
values = {
v = 202202;
cxxmin = 23;
};
};
ftms = {
name = ranges_join_with;
values = {
v = 202202;
cxxmin = 23;
};
};
ftms = {
name = ranges_repeat;
values = {
v = 202207;
cxxmin = 23;
};
};
ftms = {
name = ranges_stride;
values = {
v = 202207;
cxxmin = 23;
};
};
ftms = {
name = ranges_cartesian_product;
values = {
v = 202207;
cxxmin = 23;
};
};
ftms = {
name = ranges_as_rvalue;
values = {
v = 202207;
cxxmin = 23;
};
};
ftms = {
name = ranges_as_const;
values = {
v = 202311;
cxxmin = 23;
};
};
ftms = {
name = ranges_enumerate;
values = {
v = 202302;
cxxmin = 23;
};
};
ftms = {
name = ranges_fold;
values = {
v = 202207;
cxxmin = 23;
};
};
ftms = {
name = ranges_contains;
values = {
v = 202207;
cxxmin = 23;
};
};
ftms = {
name = ranges_iota;
values = {
v = 202202;
cxxmin = 23;
};
};
ftms = {
name = ranges_find_last;
values = {
v = 202207;
cxxmin = 23;
};
};
ftms = {
name = ranges_starts_ends_with;
values = {
v = 202106;
cxxmin = 23;
};
};
ftms = {
name = ranges_indices;
values = {
v = 202506;
cxxmin = 26;
};
};
ftms = {
name = constexpr_bitset;
values = {
v = 202202;
cxxmin = 23;
hosted = yes;
extra_cond = "__cpp_constexpr_dynamic_alloc";
};
};
ftms = {
name = stdatomic_h;
values = {
v = 202011;
cxxmin = 23;
};
};
ftms = {
name = adaptor_iterator_pair_constructor;
values = {
v = 202106;
cxxmin = 23;
hosted = yes;
};
};
ftms = {
name = flat_map;
values = {
v = 202207;
cxxmin = 23;
};
};
ftms = {
name = flat_set;
values = {
v = 202207;
cxxmin = 23;
};
};
ftms = {
name = common_reference;
values = {
v = 202302;
cxxmin = 20; // We treat P2655R3 as a DR against C++20.
};
};
ftms = {
name = common_reference_wrapper;
values = {
v = 202302;
cxxmin = 20; // We treat P2655R3 as a DR against C++20.
};
};
ftms = {
name = formatters;
values = {
v = 202302;
cxxmin = 23;
hosted = yes;
};
};
ftms = {
name = forward_like;
values = {
v = 202207;
cxxmin = 23;
};
};
ftms = {
name = generator;
values = {
v = 202207;
cxxmin = 23;
extra_cond = "__glibcxx_coroutine && __cpp_sized_deallocation";
};
};
ftms = {
name = ios_noreplace;
values = {
v = 202207;
cxxmin = 23;
hosted = yes;
};
};
ftms = {
name = move_only_function;
values = {
v = 202110;
cxxmin = 23;
hosted = yes;
};
};
ftms = {
name = copyable_function;
values = {
v = 202306;
cxxmin = 26;
hosted = yes;
};
};
ftms = {
name = function_ref;
values = {
v = 202306;
cxxmin = 26;
};
};
ftms = {
name = out_ptr;
values = {
v = 202311;
cxxmin = 23;
};
};
ftms = {
name = print;
values = {
v = 202406;
cxxmin = 23;
hosted = yes;
};
};
ftms = {
name = spanstream;
values = {
v = 202106;
cxxmin = 23;
hosted = yes;
extra_cond = "__glibcxx_span";
};
};
ftms = {
name = stacktrace;
values = {
v = 202011;
cxxmin = 23;
hosted = yes;
extra_cond = "_GLIBCXX_HAVE_STACKTRACE";
};
};
ftms = {
name = start_lifetime_as;
values = {
v = 202207;
cxxmin = 23;
};
};
ftms = {
name = string_contains;
values = {
v = 202011;
cxxmin = 23;
hosted = yes;
};
};
ftms = {
name = string_resize_and_overwrite;
values = {
v = 202110;
cxxmin = 23;
hosted = yes;
};
};
ftms = {
name = string_subview;
values = {
v = 202506;
cxxmin = 26;
};
};
ftms = {
name = to_underlying;
values = {
v = 202102;
cxxmin = 23;
};
};
ftms = {
name = tuple_like;
values = {
v = 202311;
cxxmin = 26;
extra_cond = "__cpp_explicit_this_parameter >= 202110L";
};
values = {
v = 202207;
cxxmin = 23;
};
};
ftms = {
name = unreachable;
values = {
v = 202202;
cxxmin = 23;
};
};
ftms = {
name = observable_checkpoint;
values = {
v = 202506;
cxxmin = 26;
extra_cond = "__has_builtin(__builtin_observable_checkpoint)";
};
};
ftms = {
name = algorithm_iterator_requirements;
values = {
v = 202207;
// P2408R5 is a C++23 feature, but we support it in C++20.
cxxmin = 20;
};
};
ftms = {
name = algorithm_default_value_type;
values = {
v = 202403;
cxxmin = 26;
};
};
ftms = {
name = constexpr_new;
values = {
v = 202406;
cxxmin = 26;
extra_cond = "__cpp_constexpr >= 202406L";
};
};
ftms = {
name = debugging;
values = {
v = 202403;
cxxmin = 26;
};
};
ftms = {
name = fstream_native_handle;
values = {
v = 202306;
cxxmin = 26;
hosted = yes;
};
};
ftms = {
name = is_virtual_base_of;
values = {
v = 202406;
cxxmin = 26;
extra_cond = "__has_builtin(__builtin_is_virtual_base_of)";
};
};
ftms = {
name = ranges_cache_latest;
values = {
v = 202411;
cxxmin = 26;
};
};
ftms = {
name = ranges_concat;
values = {
v = 202403;
cxxmin = 26;
extra_cond = "__cpp_pack_indexing";
};
};
ftms = {
name = ratio;
values = {
v = 202306;
cxxmin = 26;
};
};
ftms = {
name = reference_wrapper;
values = {
v = 202403;
cxxmin = 26;
};
};
ftms = {
name = saturation_arithmetic;
values = {
v = 202311;
cxxmin = 26;
};
};
ftms = {
name = span_initializer_list;
values = {
v = 202311;
cxxmin = 26;
};
};
ftms = {
name = text_encoding;
values = {
v = 202306;
cxxmin = 26;
hosted = yes;
extra_cond = "_GLIBCXX_USE_NL_LANGINFO_L";
};
};
ftms = {
name = ranges_to_input;
values = {
v = 202502;
cxxmin = 26;
};
};
ftms = {
name = to_string;
values = {
v = 202306;
cxxmin = 26;
hosted = yes;
extra_cond = "__glibcxx_to_chars";
};
};
ftms = {
name = modules;
values = {
v = 202207;
cxxmin = 20;
extra_cond = "__cpp_modules";
};
};
ftms = {
name = inplace_vector;
values = {
v = 202406;
cxxmin = 26;
};
};
ftms = {
name = indirect;
values = {
v = 202502;
cxxmin = 26;
hosted = yes;
};
};
ftms = {
name = polymorphic;
values = {
v = 202502;
cxxmin = 26;
hosted = yes;
};
};
ftms = {
name = smart_ptr_owner_equality;
values = {
v = 202306;
cxxmin = 26;
hosted = yes;
};
};
ftms = {
name = sstream_from_string_view;
values = {
v = 202306;
cxxmin = 26;
hosted = yes;
};
};
ftms = {
name = type_order;
values = {
v = 202506;
cxxmin = 26;
extra_cond = "__has_builtin(__builtin_type_order) "
"&& __cpp_lib_three_way_comparison >= 201907L";
};
};
ftms = {
name = exception_ptr_cast;
values = {
v = 202506;
cxxmin = 26;
};
};
ftms = {
name = bitset; // ...construct from string_view
values = {
v = 202306;
cxxmin = 26;
};
};
ftms = {
name = constexpr_exceptions;
values = {
v = 202502;
cxxmin = 26;
extra_cond = "__cpp_constexpr_exceptions >= 202411L";
cxx11abi = yes;
};
};
ftms = {
name = philox_engine;
values = {
v = 202406;
cxxmin = 26;
};
};
ftms = {
name = reflection;
values = {
v = 202506;
cxxmin = 26;
extra_cond = "__cpp_impl_reflection >= 202506L";
};
};
ftms = {
name = is_implicit_lifetime;
values = {
v = 202302;
cxxmin = 23;
extra_cond = "__has_builtin(__builtin_is_implicit_lifetime)";
};
};
// Standard test specifications.
stds[97] = ">= 199711L";
stds[03] = ">= 199711L";
stds[11] = ">= 201103L";
stds[14] = ">= 201402L";
stds[17] = ">= 201703L";
stds[20] = ">= 202002L";
stds[23] = ">= 202100L"; // Should be 202302L but Clang 16 uses 202101L
stds[26] = "> 202302L"; // TODO: update when finalized
// Local Variables:
// compile-command: "autogen version.def"
// End: