diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in index dd63cd77369..7f476531d84 100644 --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in @@ -188,6 +188,24 @@ endif # This is the file that depends on the generated header file. cp/name-lookup.o: $(srcdir)/cp/std-name-hint.h +ifeq ($(ENABLE_MAINTAINER_RULES), true) +# Special build rule. This is a maintainer rule, that is only +# available when GCC is configured with --enable-maintainer-mode. In +# other cases, it is not available to avoid triggering rebuilds if a +# user has the source checked out with unusual timestamps. +$(srcdir)/cp/metafns.h: $(srcdir)/cp/metafns.gperf +else +# We keep the rule so that you can still force a rebuild, even if you +# didn't configure GCC with --enable-maintainer-mode, by manually +# deleting the $(srcdir)/cp/metafns.h file. +$(srcdir)/cp/metafns.h: +endif + cd $(srcdir)/cp; gperf -o -C -E -k '1,4,5,11,14,$$' -D -N find -L C++ \ + metafns.gperf --output-file metafns.h + +# This is the file that depends on the generated header file. +cp/reflect.o: $(srcdir)/cp/metafns.h + components_in_prev = "bfd opcodes binutils fixincludes gas gcc gmp mpfr mpc isl gold intl ld libbacktrace libcpp libcody libdecnumber libiberty libiberty-linker-plugin libiconv zlib lto-plugin libctf libsframe" components_in_prev_target = "libstdc++-v3 libsanitizer libvtv libgcc libbacktrace libphobos zlib libgomp libatomic" diff --git a/gcc/cp/metafns.gperf b/gcc/cp/metafns.gperf new file mode 100644 index 00000000000..d2067174e79 --- /dev/null +++ b/gcc/cp/metafns.gperf @@ -0,0 +1,641 @@ +%language=C++ +%define class-name metafn_lookup +%struct-type +%{ +/* Copyright (C) 2025 Free Software Foundation, Inc. + Written by Jakub Jelinek + +This file is part of GCC. + +GCC 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. + +GCC 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. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +. */ + +enum metafn_code { + METAFN_OPERATOR_OF, + METAFN_SYMBOL_OF, + METAFN_U8SYMBOL_OF, + METAFN_HAS_IDENTIFIER, + METAFN_IDENTIFIER_OF, + METAFN_U8IDENTIFIER_OF, + METAFN_DISPLAY_STRING_OF, + METAFN_U8DISPLAY_STRING_OF, + METAFN_SOURCE_LOCATION_OF, + METAFN_TYPE_OF, + METAFN_OBJECT_OF, + METAFN_CONSTANT_OF, + METAFN_IS_PUBLIC, + METAFN_IS_PROTECTED, + METAFN_IS_PRIVATE, + METAFN_IS_VIRTUAL, + METAFN_IS_PURE_VIRTUAL, + METAFN_IS_OVERRIDE, + METAFN_IS_FINAL, + METAFN_IS_DELETED, + METAFN_IS_DEFAULTED, + METAFN_IS_USER_PROVIDED, + METAFN_IS_USER_DECLARED, + METAFN_IS_EXPLICIT, + METAFN_IS_NOEXCEPT, + METAFN_IS_BIT_FIELD, + METAFN_IS_ENUMERATOR, + METAFN_IS_ANNOTATION, + METAFN_IS_CONST, + METAFN_IS_VOLATILE, + METAFN_IS_MUTABLE_MEMBER, + METAFN_IS_LVALUE_REFERENCE_QUALIFIED, + METAFN_IS_RVALUE_REFERENCE_QUALIFIED, + METAFN_HAS_STATIC_STORAGE_DURATION, + METAFN_HAS_THREAD_STORAGE_DURATION, + METAFN_HAS_AUTOMATIC_STORAGE_DURATION, + METAFN_HAS_INTERNAL_LINKAGE, + METAFN_HAS_MODULE_LINKAGE, + METAFN_HAS_EXTERNAL_LINKAGE, + METAFN_HAS_C_LANGUAGE_LINKAGE, + METAFN_HAS_LINKAGE, + METAFN_IS_COMPLETE_TYPE, + METAFN_IS_ENUMERABLE_TYPE, + METAFN_IS_VARIABLE, + METAFN_IS_TYPE, + METAFN_IS_NAMESPACE, + METAFN_IS_TYPE_ALIAS, + METAFN_IS_NAMESPACE_ALIAS, + METAFN_IS_FUNCTION, + METAFN_IS_CONVERSION_FUNCTION, + METAFN_IS_OPERATOR_FUNCTION, + METAFN_IS_LITERAL_OPERATOR, + METAFN_IS_SPECIAL_MEMBER_FUNCTION, + METAFN_IS_CONSTRUCTOR, + METAFN_IS_DEFAULT_CONSTRUCTOR, + METAFN_IS_COPY_CONSTRUCTOR, + METAFN_IS_MOVE_CONSTRUCTOR, + METAFN_IS_ASSIGNMENT, + METAFN_IS_COPY_ASSIGNMENT, + METAFN_IS_MOVE_ASSIGNMENT, + METAFN_IS_DESTRUCTOR, + METAFN_IS_FUNCTION_PARAMETER, + METAFN_IS_EXPLICIT_OBJECT_PARAMETER, + METAFN_HAS_DEFAULT_ARGUMENT, + METAFN_HAS_ELLIPSIS_PARAMETER, + METAFN_IS_TEMPLATE, + METAFN_IS_FUNCTION_TEMPLATE, + METAFN_IS_VARIABLE_TEMPLATE, + METAFN_IS_CLASS_TEMPLATE, + METAFN_IS_ALIAS_TEMPLATE, + METAFN_IS_CONVERSION_FUNCTION_TEMPLATE, + METAFN_IS_OPERATOR_FUNCTION_TEMPLATE, + METAFN_IS_LITERAL_OPERATOR_TEMPLATE, + METAFN_IS_CONSTRUCTOR_TEMPLATE, + METAFN_IS_CONCEPT, + METAFN_IS_VALUE, + METAFN_IS_OBJECT, + METAFN_IS_STRUCTURED_BINDING, + METAFN_IS_CLASS_MEMBER, + METAFN_IS_NAMESPACE_MEMBER, + METAFN_IS_NONSTATIC_DATA_MEMBER, + METAFN_IS_STATIC_MEMBER, + METAFN_IS_BASE, + METAFN_HAS_DEFAULT_MEMBER_INITIALIZER, + METAFN_HAS_PARENT, + METAFN_PARENT_OF, + METAFN_DEALIAS, + METAFN_HAS_TEMPLATE_ARGUMENTS, + METAFN_TEMPLATE_OF, + METAFN_TEMPLATE_ARGUMENTS_OF, + METAFN_PARAMETERS_OF, + METAFN_VARIABLE_OF, + METAFN_RETURN_TYPE_OF, + METAFN_IS_ACCESSIBLE, + METAFN_HAS_INACCESSIBLE_NONSTATIC_DATA_MEMBERS, + METAFN_HAS_INACCESSIBLE_BASES, + METAFN_HAS_INACCESSIBLE_SUBOBJECTS, + METAFN_MEMBERS_OF, + METAFN_BASES_OF, + METAFN_STATIC_DATA_MEMBERS_OF, + METAFN_NONSTATIC_DATA_MEMBERS_OF, + METAFN_SUBOBJECTS_OF, + METAFN_ENUMERATORS_OF, + METAFN_OFFSET_OF, + METAFN_SIZE_OF, + METAFN_ALIGNMENT_OF, + METAFN_BIT_SIZE_OF, + METAFN_EXTRACT, + METAFN_CAN_SUBSTITUTE, + METAFN_SUBSTITUTE, + METAFN_REFLECT_CONSTANT, + METAFN_REFLECT_OBJECT, + METAFN_REFLECT_FUNCTION, + METAFN_REFLECT_CONSTANT_STRING, + METAFN_REFLECT_CONSTANT_ARRAY, + METAFN_DATA_MEMBER_SPEC, + METAFN_IS_DATA_MEMBER_SPEC, + METAFN_DEFINE_AGGREGATE, + METAFN_IS_VOID_TYPE, + METAFN_IS_NULL_POINTER_TYPE, + METAFN_IS_INTEGRAL_TYPE, + METAFN_IS_FLOATING_POINT_TYPE, + METAFN_IS_ARRAY_TYPE, + METAFN_IS_POINTER_TYPE, + METAFN_IS_LVALUE_REFERENCE_TYPE, + METAFN_IS_RVALUE_REFERENCE_TYPE, + METAFN_IS_MEMBER_OBJECT_POINTER_TYPE, + METAFN_IS_MEMBER_FUNCTION_POINTER_TYPE, + METAFN_IS_ENUM_TYPE, + METAFN_IS_UNION_TYPE, + METAFN_IS_CLASS_TYPE, + METAFN_IS_FUNCTION_TYPE, + METAFN_IS_REFLECTION_TYPE, + METAFN_IS_REFERENCE_TYPE, + METAFN_IS_ARITHMETIC_TYPE, + METAFN_IS_FUNDAMENTAL_TYPE, + METAFN_IS_OBJECT_TYPE, + METAFN_IS_SCALAR_TYPE, + METAFN_IS_COMPOUND_TYPE, + METAFN_IS_MEMBER_POINTER_TYPE, + METAFN_IS_CONST_TYPE, + METAFN_IS_VOLATILE_TYPE, + METAFN_IS_TRIVIALLY_COPYABLE_TYPE, + METAFN_IS_TRIVIALLY_RELOCATABLE_TYPE, + METAFN_IS_REPLACEABLE_TYPE, + METAFN_IS_STANDARD_LAYOUT_TYPE, + METAFN_IS_EMPTY_TYPE, + METAFN_IS_POLYMORPHIC_TYPE, + METAFN_IS_ABSTRACT_TYPE, + METAFN_IS_FINAL_TYPE, + METAFN_IS_AGGREGATE_TYPE, + METAFN_IS_CONSTEVAL_ONLY_TYPE, + METAFN_IS_SIGNED_TYPE, + METAFN_IS_UNSIGNED_TYPE, + METAFN_IS_BOUNDED_ARRAY_TYPE, + METAFN_IS_UNBOUNDED_ARRAY_TYPE, + METAFN_IS_SCOPED_ENUM_TYPE, + METAFN_IS_CONSTRUCTIBLE_TYPE, + METAFN_IS_DEFAULT_CONSTRUCTIBLE_TYPE, + METAFN_IS_COPY_CONSTRUCTIBLE_TYPE, + METAFN_IS_MOVE_CONSTRUCTIBLE_TYPE, + METAFN_IS_ASSIGNABLE_TYPE, + METAFN_IS_COPY_ASSIGNABLE_TYPE, + METAFN_IS_MOVE_ASSIGNABLE_TYPE, + METAFN_IS_SWAPPABLE_WITH_TYPE, + METAFN_IS_SWAPPABLE_TYPE, + METAFN_IS_DESTRUCTIBLE_TYPE, + METAFN_IS_TRIVIALLY_CONSTRUCTIBLE_TYPE, + METAFN_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_TYPE, + METAFN_IS_TRIVIALLY_COPY_CONSTRUCTIBLE_TYPE, + METAFN_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE_TYPE, + METAFN_IS_TRIVIALLY_ASSIGNABLE_TYPE, + METAFN_IS_TRIVIALLY_COPY_ASSIGNABLE_TYPE, + METAFN_IS_TRIVIALLY_MOVE_ASSIGNABLE_TYPE, + METAFN_IS_TRIVIALLY_DESTRUCTIBLE_TYPE, + METAFN_IS_NOTHROW_CONSTRUCTIBLE_TYPE, + METAFN_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE_TYPE, + METAFN_IS_NOTHROW_COPY_CONSTRUCTIBLE_TYPE, + METAFN_IS_NOTHROW_MOVE_CONSTRUCTIBLE_TYPE, + METAFN_IS_NOTHROW_ASSIGNABLE_TYPE, + METAFN_IS_NOTHROW_COPY_ASSIGNABLE_TYPE, + METAFN_IS_NOTHROW_MOVE_ASSIGNABLE_TYPE, + METAFN_IS_NOTHROW_SWAPPABLE_WITH_TYPE, + METAFN_IS_NOTHROW_SWAPPABLE_TYPE, + METAFN_IS_NOTHROW_DESTRUCTIBLE_TYPE, + METAFN_IS_NOTHROW_RELOCATABLE_TYPE, + METAFN_IS_IMPLICIT_LIFETIME_TYPE, + METAFN_HAS_VIRTUAL_DESTRUCTOR, + METAFN_HAS_UNIQUE_OBJECT_REPRESENTATIONS, + METAFN_REFERENCE_CONSTRUCTS_FROM_TEMPORARY, + METAFN_REFERENCE_CONVERTS_FROM_TEMPORARY, + METAFN_RANK, + METAFN_EXTENT, + METAFN_IS_SAME_TYPE, + METAFN_IS_BASE_OF_TYPE, + METAFN_IS_VIRTUAL_BASE_OF_TYPE, + METAFN_IS_CONVERTIBLE_TYPE, + METAFN_IS_NOTHROW_CONVERTIBLE_TYPE, + METAFN_IS_LAYOUT_COMPATIBLE_TYPE, + METAFN_IS_POINTER_INTERCONVERTIBLE_BASE_OF_TYPE, + METAFN_IS_INVOCABLE_TYPE, + METAFN_IS_INVOCABLE_R_TYPE, + METAFN_IS_NOTHROW_INVOCABLE_TYPE, + METAFN_IS_NOTHROW_INVOCABLE_R_TYPE, + METAFN_REMOVE_CONST, + METAFN_REMOVE_VOLATILE, + METAFN_REMOVE_CV, + METAFN_ADD_CONST, + METAFN_ADD_VOLATILE, + METAFN_ADD_CV, + METAFN_REMOVE_REFERENCE, + METAFN_ADD_LVALUE_REFERENCE, + METAFN_ADD_RVALUE_REFERENCE, + METAFN_MAKE_SIGNED, + METAFN_MAKE_UNSIGNED, + METAFN_REMOVE_EXTENT, + METAFN_REMOVE_ALL_EXTENTS, + METAFN_REMOVE_POINTER, + METAFN_ADD_POINTER, + METAFN_REMOVE_CVREF, + METAFN_DECAY, + METAFN_COMMON_TYPE, + METAFN_COMMON_REFERENCE, + METAFN_UNDERLYING_TYPE, + METAFN_INVOKE_RESULT, + METAFN_UNWRAP_REFERENCE, + METAFN_UNWRAP_REF_DECAY, + METAFN_TUPLE_SIZE, + METAFN_TUPLE_ELEMENT, + METAFN_VARIANT_SIZE, + METAFN_VARIANT_ALTERNATIVE, + METAFN_TYPE_ORDER, + METAFN_ANNOTATIONS_OF, + METAFN_ANNOTATIONS_OF_WITH_TYPE, + /* Special metafunctions. */ + METAFN_ACCESS_CONTEXT_CURRENT +}; + +/* Possible return types of metafunctions. */ +enum metafn_kind_ret { + METAFN_KIND_RET_BOOL, + METAFN_KIND_RET_INFO, + METAFN_KIND_RET_SIZE_T, + METAFN_KIND_RET_MEMBER_OFFSET, + METAFN_KIND_RET_OPERATORS, + METAFN_KIND_RET_SOURCE_LOCATION, + METAFN_KIND_RET_STRING_VIEW, + METAFN_KIND_RET_U8STRING_VIEW, + METAFN_KIND_RET_STRONG_ORDERING, + METAFN_KIND_RET_VECTOR_INFO, + METAFN_KIND_RET_ACCESS_CONTEXT, + METAFN_KIND_RET_TEMPLATE_PARM, +}; + +/* Possible argument types of metafunctions. */ +enum metafn_kind_arg { + METAFN_KIND_ARG_VOID = 0, + METAFN_KIND_ARG_INFO, + METAFN_KIND_ARG_TINFO, /* info argument which throws if not a type. */ + METAFN_KIND_ARG_REFLECTION_RANGE, + /* reflection_range with type infos only. */ + METAFN_KIND_ARG_REFLECTION_RANGET, + METAFN_KIND_ARG_INPUT_RANGE, + METAFN_KIND_ARG_SIZE_T, + METAFN_KIND_ARG_UNSIGNED, + METAFN_KIND_ARG_OPERATORS, + METAFN_KIND_ARG_ACCESS_CONTEXT, + METAFN_KIND_ARG_DATA_MEMBER_OPTIONS, + METAFN_KIND_ARG_TEMPLATE_PARM, /* Some other template parameter. */ + METAFN_KIND_ARG_TEMPLATE_PARM_REF /* Reference to template parameter. */ +}; + +/* Possible sets of 0-3 arguments of metafunctions. */ +enum metafn_kind_args { + METAFN_KIND_ARGS_VOID = METAFN_KIND_ARG_VOID, + METAFN_KIND_ARGS_INFO = METAFN_KIND_ARG_INFO, + METAFN_KIND_ARGS_TINFO = METAFN_KIND_ARG_TINFO, + METAFN_KIND_ARGS_REFLECTION_RANGET = METAFN_KIND_ARG_REFLECTION_RANGET, + METAFN_KIND_ARGS_INPUT_RANGE = METAFN_KIND_ARG_INPUT_RANGE, + METAFN_KIND_ARGS_OPERATORS = METAFN_KIND_ARG_OPERATORS, + METAFN_KIND_ARGS_TEMPLATE_PARM = METAFN_KIND_ARG_TEMPLATE_PARM, + METAFN_KIND_ARGS_TEMPLATE_PARM_REF = METAFN_KIND_ARG_TEMPLATE_PARM_REF, + METAFN_KIND_ARGS_INFO_INFO + = (METAFN_KIND_ARG_INFO << 5) | METAFN_KIND_ARG_INFO, + METAFN_KIND_ARGS_TINFO_TINFO + = (METAFN_KIND_ARG_TINFO << 5) | METAFN_KIND_ARG_TINFO, + METAFN_KIND_ARGS_TINFO_UNSIGNED + = (METAFN_KIND_ARG_UNSIGNED << 5) | METAFN_KIND_ARG_TINFO, + METAFN_KIND_ARGS_INFO_ACCESS_CONTEXT + = (METAFN_KIND_ARG_ACCESS_CONTEXT << 5) | METAFN_KIND_ARG_INFO, + METAFN_KIND_ARGS_TINFO_DATA_MEMBER_OPTIONS + = (METAFN_KIND_ARG_DATA_MEMBER_OPTIONS << 5) | METAFN_KIND_ARG_TINFO, + METAFN_KIND_ARGS_INFO_REFLECTION_RANGE + = (METAFN_KIND_ARG_REFLECTION_RANGE << 5) | METAFN_KIND_ARG_INFO, + METAFN_KIND_ARGS_TINFO_REFLECTION_RANGET + = (METAFN_KIND_ARG_REFLECTION_RANGET << 5) | METAFN_KIND_ARG_TINFO, + METAFN_KIND_ARGS_SIZE_T_TINFO + = (METAFN_KIND_ARG_TINFO << 5) | METAFN_KIND_ARG_SIZE_T, + METAFN_KIND_ARGS_TINFO_TINFO_REFLECTION_RANGET + = (METAFN_KIND_ARG_REFLECTION_RANGET << 10) | METAFN_KIND_ARGS_TINFO_TINFO, +}; + +enum metafn_kind { + METAFN_KIND_BOOL_INFO + = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_BOOL, + METAFN_KIND_BOOL_TINFO + = (METAFN_KIND_ARGS_TINFO << 5) | METAFN_KIND_RET_BOOL, + METAFN_KIND_BOOL_INFO_ACCESS_CONTEXT + = (METAFN_KIND_ARGS_INFO_ACCESS_CONTEXT << 5) | METAFN_KIND_RET_BOOL, + METAFN_KIND_BOOL_TINFO_TINFO + = (METAFN_KIND_ARGS_TINFO_TINFO << 5) | METAFN_KIND_RET_BOOL, + METAFN_KIND_BOOL_TINFO_REFLECTION_RANGET + = (METAFN_KIND_ARGS_TINFO_REFLECTION_RANGET << 5) | METAFN_KIND_RET_BOOL, + METAFN_KIND_BOOL_TINFO_TINFO_REFLECTION_RANGET + = (METAFN_KIND_ARGS_TINFO_TINFO_REFLECTION_RANGET << 5) + | METAFN_KIND_RET_BOOL, + METAFN_KIND_INFO_INFO = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_INFO_TINFO + = (METAFN_KIND_ARGS_TINFO << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_INFO_TINFO_REFLECTION_RANGET + = (METAFN_KIND_ARGS_TINFO_REFLECTION_RANGET << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_INFO_TINFO_DATA_MEMBER_OPTIONS + = (METAFN_KIND_ARGS_TINFO_DATA_MEMBER_OPTIONS << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_INFO_REFLECTION_RANGET + = (METAFN_KIND_ARGS_REFLECTION_RANGET << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_INFO_INFO_REFLECTION_RANGE + = (METAFN_KIND_ARGS_INFO_REFLECTION_RANGE << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_INFO_INPUT_RANGE + = (METAFN_KIND_ARGS_INPUT_RANGE << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_INFO_TEMPLATE_PARM + = (METAFN_KIND_ARGS_TEMPLATE_PARM << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_INFO_TEMPLATE_PARM_REF + = (METAFN_KIND_ARGS_TEMPLATE_PARM_REF << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_INFO_SIZE_T_TINFO + = (METAFN_KIND_ARGS_SIZE_T_TINFO << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_MEMBER_OFFSET_INFO + = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_MEMBER_OFFSET, + METAFN_KIND_OPERATORS_INFO + = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_OPERATORS, + METAFN_KIND_SIZE_T_INFO + = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_SIZE_T, + METAFN_KIND_SIZE_T_TINFO + = (METAFN_KIND_ARGS_TINFO << 5) | METAFN_KIND_RET_SIZE_T, + METAFN_KIND_SIZE_T_TINFO_UNSIGNED + = (METAFN_KIND_ARGS_TINFO_UNSIGNED << 5) | METAFN_KIND_RET_SIZE_T, + METAFN_KIND_SOURCE_LOCATION_INFO + = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_SOURCE_LOCATION, + METAFN_KIND_STRING_VIEW_INFO + = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_STRING_VIEW, + METAFN_KIND_STRING_VIEW_OPERATORS + = (METAFN_KIND_ARGS_OPERATORS << 5) | METAFN_KIND_RET_STRING_VIEW, + METAFN_KIND_U8STRING_VIEW_INFO + = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_U8STRING_VIEW, + METAFN_KIND_U8STRING_VIEW_OPERATORS + = (METAFN_KIND_ARGS_OPERATORS << 5) | METAFN_KIND_RET_U8STRING_VIEW, + METAFN_KIND_STRONG_ORDERING_TINFO_TINFO + = (METAFN_KIND_ARGS_TINFO_TINFO << 5) | METAFN_KIND_RET_STRONG_ORDERING, + METAFN_KIND_VECTOR_INFO_INFO + = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_VECTOR_INFO, + METAFN_KIND_VECTOR_INFO_INFO_INFO + = (METAFN_KIND_ARGS_INFO_INFO << 5) | METAFN_KIND_RET_VECTOR_INFO, + METAFN_KIND_VECTOR_INFO_INFO_ACCESS_CONTEXT + = (METAFN_KIND_ARGS_INFO_ACCESS_CONTEXT << 5) + | METAFN_KIND_RET_VECTOR_INFO, + METAFN_KIND_TEMPLATE_PARM_INFO + = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_TEMPLATE_PARM, + METAFN_KIND_ACCESS_CONTEXT_VOID + = (METAFN_KIND_ARGS_VOID << 5) | METAFN_KIND_RET_ACCESS_CONTEXT +}; +%} +struct metafn_info +{ + /* A name within "std::meta::" (or "std::meta::access_context::"). */ + const char *name; + + /* METAFN_ code. */ + metafn_code code; + + /* METAFN_KIND_ kind of arguments and return type. */ + metafn_kind kind; +}; +%% +operator_of, METAFN_OPERATOR_OF, METAFN_KIND_OPERATORS_INFO, +symbol_of, METAFN_SYMBOL_OF, METAFN_KIND_STRING_VIEW_OPERATORS, +u8symbol_of, METAFN_U8SYMBOL_OF, METAFN_KIND_U8STRING_VIEW_OPERATORS, +has_identifier, METAFN_HAS_IDENTIFIER, METAFN_KIND_BOOL_INFO, +identifier_of, METAFN_IDENTIFIER_OF, METAFN_KIND_STRING_VIEW_INFO, +u8identifier_of, METAFN_U8IDENTIFIER_OF, METAFN_KIND_U8STRING_VIEW_INFO, +display_string_of, METAFN_DISPLAY_STRING_OF, METAFN_KIND_STRING_VIEW_INFO, +u8display_string_of, METAFN_U8DISPLAY_STRING_OF, METAFN_KIND_U8STRING_VIEW_INFO, +source_location_of, METAFN_SOURCE_LOCATION_OF, METAFN_KIND_SOURCE_LOCATION_INFO, +type_of, METAFN_TYPE_OF, METAFN_KIND_INFO_INFO, +object_of, METAFN_OBJECT_OF, METAFN_KIND_INFO_INFO, +constant_of, METAFN_CONSTANT_OF, METAFN_KIND_INFO_INFO, +is_public, METAFN_IS_PUBLIC, METAFN_KIND_BOOL_INFO, +is_protected, METAFN_IS_PROTECTED, METAFN_KIND_BOOL_INFO, +is_private, METAFN_IS_PRIVATE, METAFN_KIND_BOOL_INFO, +is_virtual, METAFN_IS_VIRTUAL, METAFN_KIND_BOOL_INFO, +is_pure_virtual, METAFN_IS_PURE_VIRTUAL, METAFN_KIND_BOOL_INFO, +is_override, METAFN_IS_OVERRIDE, METAFN_KIND_BOOL_INFO, +is_final, METAFN_IS_FINAL, METAFN_KIND_BOOL_INFO, +is_deleted, METAFN_IS_DELETED, METAFN_KIND_BOOL_INFO, +is_defaulted, METAFN_IS_DEFAULTED, METAFN_KIND_BOOL_INFO, +is_user_provided, METAFN_IS_USER_PROVIDED, METAFN_KIND_BOOL_INFO, +is_user_declared, METAFN_IS_USER_DECLARED, METAFN_KIND_BOOL_INFO, +is_explicit, METAFN_IS_EXPLICIT, METAFN_KIND_BOOL_INFO, +is_noexcept, METAFN_IS_NOEXCEPT, METAFN_KIND_BOOL_INFO, +is_bit_field, METAFN_IS_BIT_FIELD, METAFN_KIND_BOOL_INFO, +is_enumerator, METAFN_IS_ENUMERATOR, METAFN_KIND_BOOL_INFO, +is_annotation, METAFN_IS_ANNOTATION, METAFN_KIND_BOOL_INFO, +is_const, METAFN_IS_CONST, METAFN_KIND_BOOL_INFO, +is_volatile, METAFN_IS_VOLATILE, METAFN_KIND_BOOL_INFO, +is_mutable_member, METAFN_IS_MUTABLE_MEMBER, METAFN_KIND_BOOL_INFO, +is_lvalue_reference_qualified, METAFN_IS_LVALUE_REFERENCE_QUALIFIED, METAFN_KIND_BOOL_INFO, +is_rvalue_reference_qualified, METAFN_IS_RVALUE_REFERENCE_QUALIFIED, METAFN_KIND_BOOL_INFO, +has_static_storage_duration, METAFN_HAS_STATIC_STORAGE_DURATION, METAFN_KIND_BOOL_INFO, +has_thread_storage_duration, METAFN_HAS_THREAD_STORAGE_DURATION, METAFN_KIND_BOOL_INFO, +has_automatic_storage_duration, METAFN_HAS_AUTOMATIC_STORAGE_DURATION, METAFN_KIND_BOOL_INFO, +has_internal_linkage, METAFN_HAS_INTERNAL_LINKAGE, METAFN_KIND_BOOL_INFO, +has_module_linkage, METAFN_HAS_MODULE_LINKAGE, METAFN_KIND_BOOL_INFO, +has_external_linkage, METAFN_HAS_EXTERNAL_LINKAGE, METAFN_KIND_BOOL_INFO, +has_c_language_linkage, METAFN_HAS_C_LANGUAGE_LINKAGE, METAFN_KIND_BOOL_INFO, +has_linkage, METAFN_HAS_LINKAGE, METAFN_KIND_BOOL_INFO, +is_complete_type, METAFN_IS_COMPLETE_TYPE, METAFN_KIND_BOOL_INFO, +is_enumerable_type, METAFN_IS_ENUMERABLE_TYPE, METAFN_KIND_BOOL_INFO, +is_variable, METAFN_IS_VARIABLE, METAFN_KIND_BOOL_INFO, +is_type, METAFN_IS_TYPE, METAFN_KIND_BOOL_INFO, +is_namespace, METAFN_IS_NAMESPACE, METAFN_KIND_BOOL_INFO, +is_type_alias, METAFN_IS_TYPE_ALIAS, METAFN_KIND_BOOL_INFO, +is_namespace_alias, METAFN_IS_NAMESPACE_ALIAS, METAFN_KIND_BOOL_INFO, +is_function, METAFN_IS_FUNCTION, METAFN_KIND_BOOL_INFO, +is_conversion_function, METAFN_IS_CONVERSION_FUNCTION, METAFN_KIND_BOOL_INFO, +is_operator_function, METAFN_IS_OPERATOR_FUNCTION, METAFN_KIND_BOOL_INFO, +is_literal_operator, METAFN_IS_LITERAL_OPERATOR, METAFN_KIND_BOOL_INFO, +is_special_member_function, METAFN_IS_SPECIAL_MEMBER_FUNCTION, METAFN_KIND_BOOL_INFO, +is_constructor, METAFN_IS_CONSTRUCTOR, METAFN_KIND_BOOL_INFO, +is_default_constructor, METAFN_IS_DEFAULT_CONSTRUCTOR, METAFN_KIND_BOOL_INFO, +is_copy_constructor, METAFN_IS_COPY_CONSTRUCTOR, METAFN_KIND_BOOL_INFO, +is_move_constructor, METAFN_IS_MOVE_CONSTRUCTOR, METAFN_KIND_BOOL_INFO, +is_assignment, METAFN_IS_ASSIGNMENT, METAFN_KIND_BOOL_INFO, +is_copy_assignment, METAFN_IS_COPY_ASSIGNMENT, METAFN_KIND_BOOL_INFO, +is_move_assignment, METAFN_IS_MOVE_ASSIGNMENT, METAFN_KIND_BOOL_INFO, +is_destructor, METAFN_IS_DESTRUCTOR, METAFN_KIND_BOOL_INFO, +is_function_parameter, METAFN_IS_FUNCTION_PARAMETER, METAFN_KIND_BOOL_INFO, +is_explicit_object_parameter, METAFN_IS_EXPLICIT_OBJECT_PARAMETER, METAFN_KIND_BOOL_INFO, +has_default_argument, METAFN_HAS_DEFAULT_ARGUMENT, METAFN_KIND_BOOL_INFO, +has_ellipsis_parameter, METAFN_HAS_ELLIPSIS_PARAMETER, METAFN_KIND_BOOL_INFO, +is_template, METAFN_IS_TEMPLATE, METAFN_KIND_BOOL_INFO, +is_function_template, METAFN_IS_FUNCTION_TEMPLATE, METAFN_KIND_BOOL_INFO, +is_variable_template, METAFN_IS_VARIABLE_TEMPLATE, METAFN_KIND_BOOL_INFO, +is_class_template, METAFN_IS_CLASS_TEMPLATE, METAFN_KIND_BOOL_INFO, +is_alias_template, METAFN_IS_ALIAS_TEMPLATE, METAFN_KIND_BOOL_INFO, +is_conversion_function_template, METAFN_IS_CONVERSION_FUNCTION_TEMPLATE, METAFN_KIND_BOOL_INFO, +is_operator_function_template, METAFN_IS_OPERATOR_FUNCTION_TEMPLATE, METAFN_KIND_BOOL_INFO, +is_literal_operator_template, METAFN_IS_LITERAL_OPERATOR_TEMPLATE, METAFN_KIND_BOOL_INFO, +is_constructor_template, METAFN_IS_CONSTRUCTOR_TEMPLATE, METAFN_KIND_BOOL_INFO, +is_concept, METAFN_IS_CONCEPT, METAFN_KIND_BOOL_INFO, +is_value, METAFN_IS_VALUE, METAFN_KIND_BOOL_INFO, +is_object, METAFN_IS_OBJECT, METAFN_KIND_BOOL_INFO, +is_structured_binding, METAFN_IS_STRUCTURED_BINDING, METAFN_KIND_BOOL_INFO, +is_class_member, METAFN_IS_CLASS_MEMBER, METAFN_KIND_BOOL_INFO, +is_namespace_member, METAFN_IS_NAMESPACE_MEMBER, METAFN_KIND_BOOL_INFO, +is_nonstatic_data_member, METAFN_IS_NONSTATIC_DATA_MEMBER, METAFN_KIND_BOOL_INFO, +is_static_member, METAFN_IS_STATIC_MEMBER, METAFN_KIND_BOOL_INFO, +is_base, METAFN_IS_BASE, METAFN_KIND_BOOL_INFO, +has_default_member_initializer, METAFN_HAS_DEFAULT_MEMBER_INITIALIZER, METAFN_KIND_BOOL_INFO, +has_parent, METAFN_HAS_PARENT, METAFN_KIND_BOOL_INFO, +parent_of, METAFN_PARENT_OF, METAFN_KIND_INFO_INFO, +dealias, METAFN_DEALIAS, METAFN_KIND_INFO_INFO, +has_template_arguments, METAFN_HAS_TEMPLATE_ARGUMENTS, METAFN_KIND_BOOL_INFO, +template_of, METAFN_TEMPLATE_OF, METAFN_KIND_INFO_INFO, +template_arguments_of, METAFN_TEMPLATE_ARGUMENTS_OF, METAFN_KIND_VECTOR_INFO_INFO, +parameters_of, METAFN_PARAMETERS_OF, METAFN_KIND_VECTOR_INFO_INFO, +variable_of, METAFN_VARIABLE_OF, METAFN_KIND_INFO_INFO, +return_type_of, METAFN_RETURN_TYPE_OF, METAFN_KIND_INFO_INFO, +is_accessible, METAFN_IS_ACCESSIBLE, METAFN_KIND_BOOL_INFO_ACCESS_CONTEXT, +has_inaccessible_nonstatic_data_members, METAFN_HAS_INACCESSIBLE_NONSTATIC_DATA_MEMBERS, METAFN_KIND_BOOL_INFO_ACCESS_CONTEXT, +has_inaccessible_bases, METAFN_HAS_INACCESSIBLE_BASES, METAFN_KIND_BOOL_INFO_ACCESS_CONTEXT, +has_inaccessible_subobjects, METAFN_HAS_INACCESSIBLE_SUBOBJECTS, METAFN_KIND_BOOL_INFO_ACCESS_CONTEXT, +members_of, METAFN_MEMBERS_OF, METAFN_KIND_VECTOR_INFO_INFO_ACCESS_CONTEXT, +bases_of, METAFN_BASES_OF, METAFN_KIND_VECTOR_INFO_INFO_ACCESS_CONTEXT, +static_data_members_of, METAFN_STATIC_DATA_MEMBERS_OF, METAFN_KIND_VECTOR_INFO_INFO_ACCESS_CONTEXT, +nonstatic_data_members_of, METAFN_NONSTATIC_DATA_MEMBERS_OF, METAFN_KIND_VECTOR_INFO_INFO_ACCESS_CONTEXT, +subobjects_of, METAFN_SUBOBJECTS_OF, METAFN_KIND_VECTOR_INFO_INFO_ACCESS_CONTEXT, +enumerators_of, METAFN_ENUMERATORS_OF, METAFN_KIND_VECTOR_INFO_INFO, +offset_of, METAFN_OFFSET_OF, METAFN_KIND_MEMBER_OFFSET_INFO, +size_of, METAFN_SIZE_OF, METAFN_KIND_SIZE_T_INFO, +alignment_of, METAFN_ALIGNMENT_OF, METAFN_KIND_SIZE_T_INFO, +bit_size_of, METAFN_BIT_SIZE_OF, METAFN_KIND_SIZE_T_INFO, +extract, METAFN_EXTRACT, METAFN_KIND_TEMPLATE_PARM_INFO, +can_substitute, METAFN_CAN_SUBSTITUTE, METAFN_KIND_INFO_INFO_REFLECTION_RANGE, +substitute, METAFN_SUBSTITUTE, METAFN_KIND_INFO_INFO_REFLECTION_RANGE, +reflect_constant, METAFN_REFLECT_CONSTANT, METAFN_KIND_INFO_TEMPLATE_PARM, +reflect_object, METAFN_REFLECT_OBJECT, METAFN_KIND_INFO_TEMPLATE_PARM_REF, +reflect_function, METAFN_REFLECT_FUNCTION, METAFN_KIND_INFO_TEMPLATE_PARM_REF, +reflect_constant_string, METAFN_REFLECT_CONSTANT_STRING, METAFN_KIND_INFO_INPUT_RANGE, +reflect_constant_array, METAFN_REFLECT_CONSTANT_ARRAY, METAFN_KIND_INFO_INPUT_RANGE, +data_member_spec, METAFN_DATA_MEMBER_SPEC, METAFN_KIND_INFO_TINFO_DATA_MEMBER_OPTIONS, +is_data_member_spec, METAFN_IS_DATA_MEMBER_SPEC, METAFN_KIND_BOOL_INFO, +define_aggregate, METAFN_DEFINE_AGGREGATE, METAFN_KIND_INFO_INFO_REFLECTION_RANGE, +is_void_type, METAFN_IS_VOID_TYPE, METAFN_KIND_BOOL_TINFO, +is_null_pointer_type, METAFN_IS_NULL_POINTER_TYPE, METAFN_KIND_BOOL_TINFO, +is_integral_type, METAFN_IS_INTEGRAL_TYPE, METAFN_KIND_BOOL_TINFO, +is_floating_point_type, METAFN_IS_FLOATING_POINT_TYPE, METAFN_KIND_BOOL_TINFO, +is_array_type, METAFN_IS_ARRAY_TYPE, METAFN_KIND_BOOL_TINFO, +is_pointer_type, METAFN_IS_POINTER_TYPE, METAFN_KIND_BOOL_TINFO, +is_lvalue_reference_type, METAFN_IS_LVALUE_REFERENCE_TYPE, METAFN_KIND_BOOL_TINFO, +is_rvalue_reference_type, METAFN_IS_RVALUE_REFERENCE_TYPE, METAFN_KIND_BOOL_TINFO, +is_member_object_pointer_type, METAFN_IS_MEMBER_OBJECT_POINTER_TYPE, METAFN_KIND_BOOL_TINFO, +is_member_function_pointer_type, METAFN_IS_MEMBER_FUNCTION_POINTER_TYPE, METAFN_KIND_BOOL_TINFO, +is_enum_type, METAFN_IS_ENUM_TYPE, METAFN_KIND_BOOL_TINFO, +is_union_type, METAFN_IS_UNION_TYPE, METAFN_KIND_BOOL_TINFO, +is_class_type, METAFN_IS_CLASS_TYPE, METAFN_KIND_BOOL_TINFO, +is_function_type, METAFN_IS_FUNCTION_TYPE, METAFN_KIND_BOOL_TINFO, +is_reflection_type, METAFN_IS_REFLECTION_TYPE, METAFN_KIND_BOOL_TINFO, +is_reference_type, METAFN_IS_REFERENCE_TYPE, METAFN_KIND_BOOL_TINFO, +is_arithmetic_type, METAFN_IS_ARITHMETIC_TYPE, METAFN_KIND_BOOL_TINFO, +is_fundamental_type, METAFN_IS_FUNDAMENTAL_TYPE, METAFN_KIND_BOOL_TINFO, +is_object_type, METAFN_IS_OBJECT_TYPE, METAFN_KIND_BOOL_TINFO, +is_scalar_type, METAFN_IS_SCALAR_TYPE, METAFN_KIND_BOOL_TINFO, +is_compound_type, METAFN_IS_COMPOUND_TYPE, METAFN_KIND_BOOL_TINFO, +is_member_pointer_type, METAFN_IS_MEMBER_POINTER_TYPE, METAFN_KIND_BOOL_TINFO, +is_const_type, METAFN_IS_CONST_TYPE, METAFN_KIND_BOOL_TINFO, +is_volatile_type, METAFN_IS_VOLATILE_TYPE, METAFN_KIND_BOOL_TINFO, +is_trivially_copyable_type, METAFN_IS_TRIVIALLY_COPYABLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_trivially_relocatable_type, METAFN_IS_TRIVIALLY_RELOCATABLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_replaceable_type, METAFN_IS_REPLACEABLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_standard_layout_type, METAFN_IS_STANDARD_LAYOUT_TYPE, METAFN_KIND_BOOL_TINFO, +is_empty_type, METAFN_IS_EMPTY_TYPE, METAFN_KIND_BOOL_TINFO, +is_polymorphic_type, METAFN_IS_POLYMORPHIC_TYPE, METAFN_KIND_BOOL_TINFO, +is_abstract_type, METAFN_IS_ABSTRACT_TYPE, METAFN_KIND_BOOL_TINFO, +is_final_type, METAFN_IS_FINAL_TYPE, METAFN_KIND_BOOL_TINFO, +is_aggregate_type, METAFN_IS_AGGREGATE_TYPE, METAFN_KIND_BOOL_TINFO, +is_consteval_only_type, METAFN_IS_CONSTEVAL_ONLY_TYPE, METAFN_KIND_BOOL_TINFO, +is_signed_type, METAFN_IS_SIGNED_TYPE, METAFN_KIND_BOOL_TINFO, +is_unsigned_type, METAFN_IS_UNSIGNED_TYPE, METAFN_KIND_BOOL_TINFO, +is_bounded_array_type, METAFN_IS_BOUNDED_ARRAY_TYPE, METAFN_KIND_BOOL_TINFO, +is_unbounded_array_type, METAFN_IS_UNBOUNDED_ARRAY_TYPE, METAFN_KIND_BOOL_TINFO, +is_scoped_enum_type, METAFN_IS_SCOPED_ENUM_TYPE, METAFN_KIND_BOOL_TINFO, +is_constructible_type, METAFN_IS_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO_REFLECTION_RANGET, +is_default_constructible_type, METAFN_IS_DEFAULT_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_copy_constructible_type, METAFN_IS_COPY_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_move_constructible_type, METAFN_IS_MOVE_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_assignable_type, METAFN_IS_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO_TINFO, +is_copy_assignable_type, METAFN_IS_COPY_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_move_assignable_type, METAFN_IS_MOVE_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_swappable_with_type, METAFN_IS_SWAPPABLE_WITH_TYPE, METAFN_KIND_BOOL_TINFO_TINFO, +is_swappable_type, METAFN_IS_SWAPPABLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_destructible_type, METAFN_IS_DESTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_trivially_constructible_type, METAFN_IS_TRIVIALLY_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO_REFLECTION_RANGET, +is_trivially_default_constructible_type, METAFN_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_trivially_copy_constructible_type, METAFN_IS_TRIVIALLY_COPY_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_trivially_move_constructible_type, METAFN_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_trivially_assignable_type, METAFN_IS_TRIVIALLY_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO_TINFO, +is_trivially_copy_assignable_type, METAFN_IS_TRIVIALLY_COPY_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_trivially_move_assignable_type, METAFN_IS_TRIVIALLY_MOVE_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_trivially_destructible_type, METAFN_IS_TRIVIALLY_DESTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_nothrow_constructible_type, METAFN_IS_NOTHROW_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO_REFLECTION_RANGET, +is_nothrow_default_constructible_type, METAFN_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_nothrow_copy_constructible_type, METAFN_IS_NOTHROW_COPY_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_nothrow_move_constructible_type, METAFN_IS_NOTHROW_MOVE_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_nothrow_assignable_type, METAFN_IS_NOTHROW_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO_TINFO, +is_nothrow_copy_assignable_type, METAFN_IS_NOTHROW_COPY_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_nothrow_move_assignable_type, METAFN_IS_NOTHROW_MOVE_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_nothrow_swappable_with_type, METAFN_IS_NOTHROW_SWAPPABLE_WITH_TYPE, METAFN_KIND_BOOL_TINFO_TINFO, +is_nothrow_swappable_type, METAFN_IS_NOTHROW_SWAPPABLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_nothrow_destructible_type, METAFN_IS_NOTHROW_DESTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_nothrow_relocatable_type, METAFN_IS_NOTHROW_RELOCATABLE_TYPE, METAFN_KIND_BOOL_TINFO, +is_implicit_lifetime_type, METAFN_IS_IMPLICIT_LIFETIME_TYPE, METAFN_KIND_BOOL_TINFO, +has_virtual_destructor, METAFN_HAS_VIRTUAL_DESTRUCTOR, METAFN_KIND_BOOL_TINFO, +has_unique_object_representations, METAFN_HAS_UNIQUE_OBJECT_REPRESENTATIONS, METAFN_KIND_BOOL_TINFO, +reference_constructs_from_temporary, METAFN_REFERENCE_CONSTRUCTS_FROM_TEMPORARY, METAFN_KIND_BOOL_TINFO_TINFO, +reference_converts_from_temporary, METAFN_REFERENCE_CONVERTS_FROM_TEMPORARY, METAFN_KIND_BOOL_TINFO_TINFO, +rank, METAFN_RANK, METAFN_KIND_SIZE_T_TINFO, +extent, METAFN_EXTENT, METAFN_KIND_SIZE_T_TINFO_UNSIGNED, +is_same_type, METAFN_IS_SAME_TYPE, METAFN_KIND_BOOL_TINFO_TINFO, +is_base_of_type, METAFN_IS_BASE_OF_TYPE, METAFN_KIND_BOOL_TINFO_TINFO, +is_virtual_base_of_type, METAFN_IS_VIRTUAL_BASE_OF_TYPE, METAFN_KIND_BOOL_TINFO_TINFO, +is_convertible_type, METAFN_IS_CONVERTIBLE_TYPE, METAFN_KIND_BOOL_TINFO_TINFO, +is_nothrow_convertible_type, METAFN_IS_NOTHROW_CONVERTIBLE_TYPE, METAFN_KIND_BOOL_TINFO_TINFO, +is_layout_compatible_type, METAFN_IS_LAYOUT_COMPATIBLE_TYPE, METAFN_KIND_BOOL_TINFO_TINFO, +is_pointer_interconvertible_base_of_type, METAFN_IS_POINTER_INTERCONVERTIBLE_BASE_OF_TYPE, METAFN_KIND_BOOL_TINFO_TINFO, +is_invocable_type, METAFN_IS_INVOCABLE_TYPE, METAFN_KIND_BOOL_TINFO_REFLECTION_RANGET, +is_invocable_r_type, METAFN_IS_INVOCABLE_R_TYPE, METAFN_KIND_BOOL_TINFO_TINFO_REFLECTION_RANGET, +is_nothrow_invocable_type, METAFN_IS_NOTHROW_INVOCABLE_TYPE, METAFN_KIND_BOOL_TINFO_REFLECTION_RANGET, +is_nothrow_invocable_r_type, METAFN_IS_NOTHROW_INVOCABLE_R_TYPE, METAFN_KIND_BOOL_TINFO_TINFO_REFLECTION_RANGET, +remove_const, METAFN_REMOVE_CONST, METAFN_KIND_INFO_TINFO, +remove_volatile, METAFN_REMOVE_VOLATILE, METAFN_KIND_INFO_TINFO, +remove_cv, METAFN_REMOVE_CV, METAFN_KIND_INFO_TINFO, +add_const, METAFN_ADD_CONST, METAFN_KIND_INFO_TINFO, +add_volatile, METAFN_ADD_VOLATILE, METAFN_KIND_INFO_TINFO, +add_cv, METAFN_ADD_CV, METAFN_KIND_INFO_TINFO, +remove_reference, METAFN_REMOVE_REFERENCE, METAFN_KIND_INFO_TINFO, +add_lvalue_reference, METAFN_ADD_LVALUE_REFERENCE, METAFN_KIND_INFO_TINFO, +add_rvalue_reference, METAFN_ADD_RVALUE_REFERENCE, METAFN_KIND_INFO_TINFO, +make_signed, METAFN_MAKE_SIGNED, METAFN_KIND_INFO_TINFO, +make_unsigned, METAFN_MAKE_UNSIGNED, METAFN_KIND_INFO_TINFO, +remove_extent, METAFN_REMOVE_EXTENT, METAFN_KIND_INFO_TINFO, +remove_all_extents, METAFN_REMOVE_ALL_EXTENTS, METAFN_KIND_INFO_TINFO, +remove_pointer, METAFN_REMOVE_POINTER, METAFN_KIND_INFO_TINFO, +add_pointer, METAFN_ADD_POINTER, METAFN_KIND_INFO_TINFO, +remove_cvref, METAFN_REMOVE_CVREF, METAFN_KIND_INFO_TINFO, +decay, METAFN_DECAY, METAFN_KIND_INFO_TINFO, +common_type, METAFN_COMMON_TYPE, METAFN_KIND_INFO_REFLECTION_RANGET, +common_reference, METAFN_COMMON_REFERENCE, METAFN_KIND_INFO_REFLECTION_RANGET, +underlying_type, METAFN_UNDERLYING_TYPE, METAFN_KIND_INFO_TINFO, +invoke_result, METAFN_INVOKE_RESULT, METAFN_KIND_INFO_TINFO_REFLECTION_RANGET, +unwrap_reference, METAFN_UNWRAP_REFERENCE, METAFN_KIND_INFO_TINFO, +unwrap_ref_decay, METAFN_UNWRAP_REF_DECAY, METAFN_KIND_INFO_TINFO, +tuple_size, METAFN_TUPLE_SIZE, METAFN_KIND_SIZE_T_TINFO, +tuple_element, METAFN_TUPLE_ELEMENT, METAFN_KIND_INFO_SIZE_T_TINFO, +variant_size, METAFN_VARIANT_SIZE, METAFN_KIND_SIZE_T_TINFO, +variant_alternative, METAFN_VARIANT_ALTERNATIVE, METAFN_KIND_INFO_SIZE_T_TINFO, +type_order, METAFN_TYPE_ORDER, METAFN_KIND_STRONG_ORDERING_TINFO_TINFO, +annotations_of, METAFN_ANNOTATIONS_OF, METAFN_KIND_VECTOR_INFO_INFO, +annotations_of_with_type, METAFN_ANNOTATIONS_OF_WITH_TYPE, METAFN_KIND_VECTOR_INFO_INFO_INFO, +current, METAFN_ACCESS_CONTEXT_CURRENT, METAFN_KIND_ACCESS_CONTEXT_VOID, diff --git a/gcc/cp/metafns.h b/gcc/cp/metafns.h new file mode 100644 index 00000000000..38647da0e68 --- /dev/null +++ b/gcc/cp/metafns.h @@ -0,0 +1,1092 @@ +/* C++ code produced by gperf version 3.1 */ +/* Command-line: gperf -o -C -E -k '1,4,5,11,14,$' -D -N find -L C++ --output-file metafns.h metafns.gperf */ + +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +#error "gperf generated tables don't work with this execution character set. Please report a bug to ." +#endif + +#line 4 "metafns.gperf" + +/* Copyright (C) 2025 Free Software Foundation, Inc. + Written by Jakub Jelinek + +This file is part of GCC. + +GCC 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. + +GCC 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. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +. */ + +enum metafn_code { + METAFN_OPERATOR_OF, + METAFN_SYMBOL_OF, + METAFN_U8SYMBOL_OF, + METAFN_HAS_IDENTIFIER, + METAFN_IDENTIFIER_OF, + METAFN_U8IDENTIFIER_OF, + METAFN_DISPLAY_STRING_OF, + METAFN_U8DISPLAY_STRING_OF, + METAFN_SOURCE_LOCATION_OF, + METAFN_TYPE_OF, + METAFN_OBJECT_OF, + METAFN_CONSTANT_OF, + METAFN_IS_PUBLIC, + METAFN_IS_PROTECTED, + METAFN_IS_PRIVATE, + METAFN_IS_VIRTUAL, + METAFN_IS_PURE_VIRTUAL, + METAFN_IS_OVERRIDE, + METAFN_IS_FINAL, + METAFN_IS_DELETED, + METAFN_IS_DEFAULTED, + METAFN_IS_USER_PROVIDED, + METAFN_IS_USER_DECLARED, + METAFN_IS_EXPLICIT, + METAFN_IS_NOEXCEPT, + METAFN_IS_BIT_FIELD, + METAFN_IS_ENUMERATOR, + METAFN_IS_ANNOTATION, + METAFN_IS_CONST, + METAFN_IS_VOLATILE, + METAFN_IS_MUTABLE_MEMBER, + METAFN_IS_LVALUE_REFERENCE_QUALIFIED, + METAFN_IS_RVALUE_REFERENCE_QUALIFIED, + METAFN_HAS_STATIC_STORAGE_DURATION, + METAFN_HAS_THREAD_STORAGE_DURATION, + METAFN_HAS_AUTOMATIC_STORAGE_DURATION, + METAFN_HAS_INTERNAL_LINKAGE, + METAFN_HAS_MODULE_LINKAGE, + METAFN_HAS_EXTERNAL_LINKAGE, + METAFN_HAS_C_LANGUAGE_LINKAGE, + METAFN_HAS_LINKAGE, + METAFN_IS_COMPLETE_TYPE, + METAFN_IS_ENUMERABLE_TYPE, + METAFN_IS_VARIABLE, + METAFN_IS_TYPE, + METAFN_IS_NAMESPACE, + METAFN_IS_TYPE_ALIAS, + METAFN_IS_NAMESPACE_ALIAS, + METAFN_IS_FUNCTION, + METAFN_IS_CONVERSION_FUNCTION, + METAFN_IS_OPERATOR_FUNCTION, + METAFN_IS_LITERAL_OPERATOR, + METAFN_IS_SPECIAL_MEMBER_FUNCTION, + METAFN_IS_CONSTRUCTOR, + METAFN_IS_DEFAULT_CONSTRUCTOR, + METAFN_IS_COPY_CONSTRUCTOR, + METAFN_IS_MOVE_CONSTRUCTOR, + METAFN_IS_ASSIGNMENT, + METAFN_IS_COPY_ASSIGNMENT, + METAFN_IS_MOVE_ASSIGNMENT, + METAFN_IS_DESTRUCTOR, + METAFN_IS_FUNCTION_PARAMETER, + METAFN_IS_EXPLICIT_OBJECT_PARAMETER, + METAFN_HAS_DEFAULT_ARGUMENT, + METAFN_HAS_ELLIPSIS_PARAMETER, + METAFN_IS_TEMPLATE, + METAFN_IS_FUNCTION_TEMPLATE, + METAFN_IS_VARIABLE_TEMPLATE, + METAFN_IS_CLASS_TEMPLATE, + METAFN_IS_ALIAS_TEMPLATE, + METAFN_IS_CONVERSION_FUNCTION_TEMPLATE, + METAFN_IS_OPERATOR_FUNCTION_TEMPLATE, + METAFN_IS_LITERAL_OPERATOR_TEMPLATE, + METAFN_IS_CONSTRUCTOR_TEMPLATE, + METAFN_IS_CONCEPT, + METAFN_IS_VALUE, + METAFN_IS_OBJECT, + METAFN_IS_STRUCTURED_BINDING, + METAFN_IS_CLASS_MEMBER, + METAFN_IS_NAMESPACE_MEMBER, + METAFN_IS_NONSTATIC_DATA_MEMBER, + METAFN_IS_STATIC_MEMBER, + METAFN_IS_BASE, + METAFN_HAS_DEFAULT_MEMBER_INITIALIZER, + METAFN_HAS_PARENT, + METAFN_PARENT_OF, + METAFN_DEALIAS, + METAFN_HAS_TEMPLATE_ARGUMENTS, + METAFN_TEMPLATE_OF, + METAFN_TEMPLATE_ARGUMENTS_OF, + METAFN_PARAMETERS_OF, + METAFN_VARIABLE_OF, + METAFN_RETURN_TYPE_OF, + METAFN_IS_ACCESSIBLE, + METAFN_HAS_INACCESSIBLE_NONSTATIC_DATA_MEMBERS, + METAFN_HAS_INACCESSIBLE_BASES, + METAFN_HAS_INACCESSIBLE_SUBOBJECTS, + METAFN_MEMBERS_OF, + METAFN_BASES_OF, + METAFN_STATIC_DATA_MEMBERS_OF, + METAFN_NONSTATIC_DATA_MEMBERS_OF, + METAFN_SUBOBJECTS_OF, + METAFN_ENUMERATORS_OF, + METAFN_OFFSET_OF, + METAFN_SIZE_OF, + METAFN_ALIGNMENT_OF, + METAFN_BIT_SIZE_OF, + METAFN_EXTRACT, + METAFN_CAN_SUBSTITUTE, + METAFN_SUBSTITUTE, + METAFN_REFLECT_CONSTANT, + METAFN_REFLECT_OBJECT, + METAFN_REFLECT_FUNCTION, + METAFN_REFLECT_CONSTANT_STRING, + METAFN_REFLECT_CONSTANT_ARRAY, + METAFN_DATA_MEMBER_SPEC, + METAFN_IS_DATA_MEMBER_SPEC, + METAFN_DEFINE_AGGREGATE, + METAFN_IS_VOID_TYPE, + METAFN_IS_NULL_POINTER_TYPE, + METAFN_IS_INTEGRAL_TYPE, + METAFN_IS_FLOATING_POINT_TYPE, + METAFN_IS_ARRAY_TYPE, + METAFN_IS_POINTER_TYPE, + METAFN_IS_LVALUE_REFERENCE_TYPE, + METAFN_IS_RVALUE_REFERENCE_TYPE, + METAFN_IS_MEMBER_OBJECT_POINTER_TYPE, + METAFN_IS_MEMBER_FUNCTION_POINTER_TYPE, + METAFN_IS_ENUM_TYPE, + METAFN_IS_UNION_TYPE, + METAFN_IS_CLASS_TYPE, + METAFN_IS_FUNCTION_TYPE, + METAFN_IS_REFLECTION_TYPE, + METAFN_IS_REFERENCE_TYPE, + METAFN_IS_ARITHMETIC_TYPE, + METAFN_IS_FUNDAMENTAL_TYPE, + METAFN_IS_OBJECT_TYPE, + METAFN_IS_SCALAR_TYPE, + METAFN_IS_COMPOUND_TYPE, + METAFN_IS_MEMBER_POINTER_TYPE, + METAFN_IS_CONST_TYPE, + METAFN_IS_VOLATILE_TYPE, + METAFN_IS_TRIVIALLY_COPYABLE_TYPE, + METAFN_IS_TRIVIALLY_RELOCATABLE_TYPE, + METAFN_IS_REPLACEABLE_TYPE, + METAFN_IS_STANDARD_LAYOUT_TYPE, + METAFN_IS_EMPTY_TYPE, + METAFN_IS_POLYMORPHIC_TYPE, + METAFN_IS_ABSTRACT_TYPE, + METAFN_IS_FINAL_TYPE, + METAFN_IS_AGGREGATE_TYPE, + METAFN_IS_CONSTEVAL_ONLY_TYPE, + METAFN_IS_SIGNED_TYPE, + METAFN_IS_UNSIGNED_TYPE, + METAFN_IS_BOUNDED_ARRAY_TYPE, + METAFN_IS_UNBOUNDED_ARRAY_TYPE, + METAFN_IS_SCOPED_ENUM_TYPE, + METAFN_IS_CONSTRUCTIBLE_TYPE, + METAFN_IS_DEFAULT_CONSTRUCTIBLE_TYPE, + METAFN_IS_COPY_CONSTRUCTIBLE_TYPE, + METAFN_IS_MOVE_CONSTRUCTIBLE_TYPE, + METAFN_IS_ASSIGNABLE_TYPE, + METAFN_IS_COPY_ASSIGNABLE_TYPE, + METAFN_IS_MOVE_ASSIGNABLE_TYPE, + METAFN_IS_SWAPPABLE_WITH_TYPE, + METAFN_IS_SWAPPABLE_TYPE, + METAFN_IS_DESTRUCTIBLE_TYPE, + METAFN_IS_TRIVIALLY_CONSTRUCTIBLE_TYPE, + METAFN_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_TYPE, + METAFN_IS_TRIVIALLY_COPY_CONSTRUCTIBLE_TYPE, + METAFN_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE_TYPE, + METAFN_IS_TRIVIALLY_ASSIGNABLE_TYPE, + METAFN_IS_TRIVIALLY_COPY_ASSIGNABLE_TYPE, + METAFN_IS_TRIVIALLY_MOVE_ASSIGNABLE_TYPE, + METAFN_IS_TRIVIALLY_DESTRUCTIBLE_TYPE, + METAFN_IS_NOTHROW_CONSTRUCTIBLE_TYPE, + METAFN_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE_TYPE, + METAFN_IS_NOTHROW_COPY_CONSTRUCTIBLE_TYPE, + METAFN_IS_NOTHROW_MOVE_CONSTRUCTIBLE_TYPE, + METAFN_IS_NOTHROW_ASSIGNABLE_TYPE, + METAFN_IS_NOTHROW_COPY_ASSIGNABLE_TYPE, + METAFN_IS_NOTHROW_MOVE_ASSIGNABLE_TYPE, + METAFN_IS_NOTHROW_SWAPPABLE_WITH_TYPE, + METAFN_IS_NOTHROW_SWAPPABLE_TYPE, + METAFN_IS_NOTHROW_DESTRUCTIBLE_TYPE, + METAFN_IS_NOTHROW_RELOCATABLE_TYPE, + METAFN_IS_IMPLICIT_LIFETIME_TYPE, + METAFN_HAS_VIRTUAL_DESTRUCTOR, + METAFN_HAS_UNIQUE_OBJECT_REPRESENTATIONS, + METAFN_REFERENCE_CONSTRUCTS_FROM_TEMPORARY, + METAFN_REFERENCE_CONVERTS_FROM_TEMPORARY, + METAFN_RANK, + METAFN_EXTENT, + METAFN_IS_SAME_TYPE, + METAFN_IS_BASE_OF_TYPE, + METAFN_IS_VIRTUAL_BASE_OF_TYPE, + METAFN_IS_CONVERTIBLE_TYPE, + METAFN_IS_NOTHROW_CONVERTIBLE_TYPE, + METAFN_IS_LAYOUT_COMPATIBLE_TYPE, + METAFN_IS_POINTER_INTERCONVERTIBLE_BASE_OF_TYPE, + METAFN_IS_INVOCABLE_TYPE, + METAFN_IS_INVOCABLE_R_TYPE, + METAFN_IS_NOTHROW_INVOCABLE_TYPE, + METAFN_IS_NOTHROW_INVOCABLE_R_TYPE, + METAFN_REMOVE_CONST, + METAFN_REMOVE_VOLATILE, + METAFN_REMOVE_CV, + METAFN_ADD_CONST, + METAFN_ADD_VOLATILE, + METAFN_ADD_CV, + METAFN_REMOVE_REFERENCE, + METAFN_ADD_LVALUE_REFERENCE, + METAFN_ADD_RVALUE_REFERENCE, + METAFN_MAKE_SIGNED, + METAFN_MAKE_UNSIGNED, + METAFN_REMOVE_EXTENT, + METAFN_REMOVE_ALL_EXTENTS, + METAFN_REMOVE_POINTER, + METAFN_ADD_POINTER, + METAFN_REMOVE_CVREF, + METAFN_DECAY, + METAFN_COMMON_TYPE, + METAFN_COMMON_REFERENCE, + METAFN_UNDERLYING_TYPE, + METAFN_INVOKE_RESULT, + METAFN_UNWRAP_REFERENCE, + METAFN_UNWRAP_REF_DECAY, + METAFN_TUPLE_SIZE, + METAFN_TUPLE_ELEMENT, + METAFN_VARIANT_SIZE, + METAFN_VARIANT_ALTERNATIVE, + METAFN_TYPE_ORDER, + METAFN_ANNOTATIONS_OF, + METAFN_ANNOTATIONS_OF_WITH_TYPE, + /* Special metafunctions. */ + METAFN_ACCESS_CONTEXT_CURRENT +}; + +/* Possible return types of metafunctions. */ +enum metafn_kind_ret { + METAFN_KIND_RET_BOOL, + METAFN_KIND_RET_INFO, + METAFN_KIND_RET_SIZE_T, + METAFN_KIND_RET_MEMBER_OFFSET, + METAFN_KIND_RET_OPERATORS, + METAFN_KIND_RET_SOURCE_LOCATION, + METAFN_KIND_RET_STRING_VIEW, + METAFN_KIND_RET_U8STRING_VIEW, + METAFN_KIND_RET_STRONG_ORDERING, + METAFN_KIND_RET_VECTOR_INFO, + METAFN_KIND_RET_ACCESS_CONTEXT, + METAFN_KIND_RET_TEMPLATE_PARM, +}; + +/* Possible argument types of metafunctions. */ +enum metafn_kind_arg { + METAFN_KIND_ARG_VOID = 0, + METAFN_KIND_ARG_INFO, + METAFN_KIND_ARG_TINFO, /* info argument which throws if not a type. */ + METAFN_KIND_ARG_REFLECTION_RANGE, + /* reflection_range with type infos only. */ + METAFN_KIND_ARG_REFLECTION_RANGET, + METAFN_KIND_ARG_INPUT_RANGE, + METAFN_KIND_ARG_SIZE_T, + METAFN_KIND_ARG_UNSIGNED, + METAFN_KIND_ARG_OPERATORS, + METAFN_KIND_ARG_ACCESS_CONTEXT, + METAFN_KIND_ARG_DATA_MEMBER_OPTIONS, + METAFN_KIND_ARG_TEMPLATE_PARM, /* Some other template parameter. */ + METAFN_KIND_ARG_TEMPLATE_PARM_REF /* Reference to template parameter. */ +}; + +/* Possible sets of 0-3 arguments of metafunctions. */ +enum metafn_kind_args { + METAFN_KIND_ARGS_VOID = METAFN_KIND_ARG_VOID, + METAFN_KIND_ARGS_INFO = METAFN_KIND_ARG_INFO, + METAFN_KIND_ARGS_TINFO = METAFN_KIND_ARG_TINFO, + METAFN_KIND_ARGS_REFLECTION_RANGET = METAFN_KIND_ARG_REFLECTION_RANGET, + METAFN_KIND_ARGS_INPUT_RANGE = METAFN_KIND_ARG_INPUT_RANGE, + METAFN_KIND_ARGS_OPERATORS = METAFN_KIND_ARG_OPERATORS, + METAFN_KIND_ARGS_TEMPLATE_PARM = METAFN_KIND_ARG_TEMPLATE_PARM, + METAFN_KIND_ARGS_TEMPLATE_PARM_REF = METAFN_KIND_ARG_TEMPLATE_PARM_REF, + METAFN_KIND_ARGS_INFO_INFO + = (METAFN_KIND_ARG_INFO << 5) | METAFN_KIND_ARG_INFO, + METAFN_KIND_ARGS_TINFO_TINFO + = (METAFN_KIND_ARG_TINFO << 5) | METAFN_KIND_ARG_TINFO, + METAFN_KIND_ARGS_TINFO_UNSIGNED + = (METAFN_KIND_ARG_UNSIGNED << 5) | METAFN_KIND_ARG_TINFO, + METAFN_KIND_ARGS_INFO_ACCESS_CONTEXT + = (METAFN_KIND_ARG_ACCESS_CONTEXT << 5) | METAFN_KIND_ARG_INFO, + METAFN_KIND_ARGS_TINFO_DATA_MEMBER_OPTIONS + = (METAFN_KIND_ARG_DATA_MEMBER_OPTIONS << 5) | METAFN_KIND_ARG_TINFO, + METAFN_KIND_ARGS_INFO_REFLECTION_RANGE + = (METAFN_KIND_ARG_REFLECTION_RANGE << 5) | METAFN_KIND_ARG_INFO, + METAFN_KIND_ARGS_TINFO_REFLECTION_RANGET + = (METAFN_KIND_ARG_REFLECTION_RANGET << 5) | METAFN_KIND_ARG_TINFO, + METAFN_KIND_ARGS_SIZE_T_TINFO + = (METAFN_KIND_ARG_TINFO << 5) | METAFN_KIND_ARG_SIZE_T, + METAFN_KIND_ARGS_TINFO_TINFO_REFLECTION_RANGET + = (METAFN_KIND_ARG_REFLECTION_RANGET << 10) | METAFN_KIND_ARGS_TINFO_TINFO, +}; + +enum metafn_kind { + METAFN_KIND_BOOL_INFO + = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_BOOL, + METAFN_KIND_BOOL_TINFO + = (METAFN_KIND_ARGS_TINFO << 5) | METAFN_KIND_RET_BOOL, + METAFN_KIND_BOOL_INFO_ACCESS_CONTEXT + = (METAFN_KIND_ARGS_INFO_ACCESS_CONTEXT << 5) | METAFN_KIND_RET_BOOL, + METAFN_KIND_BOOL_TINFO_TINFO + = (METAFN_KIND_ARGS_TINFO_TINFO << 5) | METAFN_KIND_RET_BOOL, + METAFN_KIND_BOOL_TINFO_REFLECTION_RANGET + = (METAFN_KIND_ARGS_TINFO_REFLECTION_RANGET << 5) | METAFN_KIND_RET_BOOL, + METAFN_KIND_BOOL_TINFO_TINFO_REFLECTION_RANGET + = (METAFN_KIND_ARGS_TINFO_TINFO_REFLECTION_RANGET << 5) + | METAFN_KIND_RET_BOOL, + METAFN_KIND_INFO_INFO = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_INFO_TINFO + = (METAFN_KIND_ARGS_TINFO << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_INFO_TINFO_REFLECTION_RANGET + = (METAFN_KIND_ARGS_TINFO_REFLECTION_RANGET << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_INFO_TINFO_DATA_MEMBER_OPTIONS + = (METAFN_KIND_ARGS_TINFO_DATA_MEMBER_OPTIONS << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_INFO_REFLECTION_RANGET + = (METAFN_KIND_ARGS_REFLECTION_RANGET << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_INFO_INFO_REFLECTION_RANGE + = (METAFN_KIND_ARGS_INFO_REFLECTION_RANGE << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_INFO_INPUT_RANGE + = (METAFN_KIND_ARGS_INPUT_RANGE << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_INFO_TEMPLATE_PARM + = (METAFN_KIND_ARGS_TEMPLATE_PARM << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_INFO_TEMPLATE_PARM_REF + = (METAFN_KIND_ARGS_TEMPLATE_PARM_REF << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_INFO_SIZE_T_TINFO + = (METAFN_KIND_ARGS_SIZE_T_TINFO << 5) | METAFN_KIND_RET_INFO, + METAFN_KIND_MEMBER_OFFSET_INFO + = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_MEMBER_OFFSET, + METAFN_KIND_OPERATORS_INFO + = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_OPERATORS, + METAFN_KIND_SIZE_T_INFO + = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_SIZE_T, + METAFN_KIND_SIZE_T_TINFO + = (METAFN_KIND_ARGS_TINFO << 5) | METAFN_KIND_RET_SIZE_T, + METAFN_KIND_SIZE_T_TINFO_UNSIGNED + = (METAFN_KIND_ARGS_TINFO_UNSIGNED << 5) | METAFN_KIND_RET_SIZE_T, + METAFN_KIND_SOURCE_LOCATION_INFO + = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_SOURCE_LOCATION, + METAFN_KIND_STRING_VIEW_INFO + = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_STRING_VIEW, + METAFN_KIND_STRING_VIEW_OPERATORS + = (METAFN_KIND_ARGS_OPERATORS << 5) | METAFN_KIND_RET_STRING_VIEW, + METAFN_KIND_U8STRING_VIEW_INFO + = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_U8STRING_VIEW, + METAFN_KIND_U8STRING_VIEW_OPERATORS + = (METAFN_KIND_ARGS_OPERATORS << 5) | METAFN_KIND_RET_U8STRING_VIEW, + METAFN_KIND_STRONG_ORDERING_TINFO_TINFO + = (METAFN_KIND_ARGS_TINFO_TINFO << 5) | METAFN_KIND_RET_STRONG_ORDERING, + METAFN_KIND_VECTOR_INFO_INFO + = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_VECTOR_INFO, + METAFN_KIND_VECTOR_INFO_INFO_INFO + = (METAFN_KIND_ARGS_INFO_INFO << 5) | METAFN_KIND_RET_VECTOR_INFO, + METAFN_KIND_VECTOR_INFO_INFO_ACCESS_CONTEXT + = (METAFN_KIND_ARGS_INFO_ACCESS_CONTEXT << 5) + | METAFN_KIND_RET_VECTOR_INFO, + METAFN_KIND_TEMPLATE_PARM_INFO + = (METAFN_KIND_ARGS_INFO << 5) | METAFN_KIND_RET_TEMPLATE_PARM, + METAFN_KIND_ACCESS_CONTEXT_VOID + = (METAFN_KIND_ARGS_VOID << 5) | METAFN_KIND_RET_ACCESS_CONTEXT +}; +#line 395 "metafns.gperf" +struct metafn_info +{ + /* A name within "std::meta::" (or "std::meta::access_context::"). */ + const char *name; + + /* METAFN_ code. */ + metafn_code code; + + /* METAFN_KIND_ kind of arguments and return type. */ + metafn_kind kind; +}; +/* maximum key range = 712, duplicates = 0 */ + +class metafn_lookup +{ +private: + static inline unsigned int hash (const char *str, size_t len); +public: + static const struct metafn_info *find (const char *str, size_t len); +}; + +inline unsigned int +metafn_lookup::hash (const char *str, size_t len) +{ + static const unsigned short asso_values[] = + { + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 5, 120, 130, 10, 45, + 85, 5, 55, 10, 95, 20, 124, 0, 60, 105, + 0, 235, 0, 0, 35, 55, 25, 135, 5, 150, + 0, 254, 20, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, + 751, 751, 751, 751, 751, 751, 751 + }; + unsigned int hval = len; + + switch (hval) + { + default: + hval += asso_values[static_cast(str[13])]; + /*FALLTHROUGH*/ + case 13: + case 12: + case 11: + hval += asso_values[static_cast(str[10])]; + /*FALLTHROUGH*/ + case 10: + case 9: + case 8: + case 7: + case 6: + case 5: + hval += asso_values[static_cast(str[4]+1)]; + /*FALLTHROUGH*/ + case 4: + hval += asso_values[static_cast(str[3])]; + /*FALLTHROUGH*/ + case 3: + case 2: + case 1: + hval += asso_values[static_cast(str[0])]; + break; + } + return hval + asso_values[static_cast(str[len - 1])]; +} + +const struct metafn_info * +metafn_lookup::find (const char *str, size_t len) +{ + enum + { + TOTAL_KEYWORDS = 235, + MIN_WORD_LENGTH = 4, + MAX_WORD_LENGTH = 40, + MIN_HASH_VALUE = 39, + MAX_HASH_VALUE = 750 + }; + + static const struct metafn_info wordlist[] = + { +#line 598 "metafns.gperf" + {"rank", METAFN_RANK, METAFN_KIND_SIZE_T_TINFO,}, +#line 525 "metafns.gperf" + {"is_void_type", METAFN_IS_VOID_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 530 "metafns.gperf" + {"is_pointer_type", METAFN_IS_POINTER_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 436 "metafns.gperf" + {"is_volatile", METAFN_IS_VOLATILE, METAFN_KIND_BOOL_INFO,}, +#line 482 "metafns.gperf" + {"is_value", METAFN_IS_VALUE, METAFN_KIND_BOOL_INFO,}, +#line 489 "metafns.gperf" + {"is_base", METAFN_IS_BASE, METAFN_KIND_BOOL_INFO,}, +#line 450 "metafns.gperf" + {"is_variable", METAFN_IS_VARIABLE, METAFN_KIND_BOOL_INFO,}, +#line 604 "metafns.gperf" + {"is_nothrow_convertible_type", METAFN_IS_NOTHROW_CONVERTIBLE_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, +#line 582 "metafns.gperf" + {"is_nothrow_constructible_type", METAFN_IS_NOTHROW_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO_REFLECTION_RANGET,}, +#line 609 "metafns.gperf" + {"is_nothrow_invocable_type", METAFN_IS_NOTHROW_INVOCABLE_TYPE, METAFN_KIND_BOOL_TINFO_REFLECTION_RANGET,}, +#line 587 "metafns.gperf" + {"is_nothrow_copy_assignable_type", METAFN_IS_NOTHROW_COPY_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 610 "metafns.gperf" + {"is_nothrow_invocable_r_type", METAFN_IS_NOTHROW_INVOCABLE_R_TYPE, METAFN_KIND_BOOL_TINFO_TINFO_REFLECTION_RANGET,}, +#line 584 "metafns.gperf" + {"is_nothrow_copy_constructible_type", METAFN_IS_NOTHROW_COPY_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 601 "metafns.gperf" + {"is_base_of_type", METAFN_IS_BASE_OF_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, +#line 588 "metafns.gperf" + {"is_nothrow_move_assignable_type", METAFN_IS_NOTHROW_MOVE_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 585 "metafns.gperf" + {"is_nothrow_move_constructible_type", METAFN_IS_NOTHROW_MOVE_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 474 "metafns.gperf" + {"is_variable_template", METAFN_IS_VARIABLE_TEMPLATE, METAFN_KIND_BOOL_INFO,}, +#line 636 "metafns.gperf" + {"variant_size", METAFN_VARIANT_SIZE, METAFN_KIND_SIZE_T_TINFO,}, +#line 526 "metafns.gperf" + {"is_null_pointer_type", METAFN_IS_NULL_POINTER_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 451 "metafns.gperf" + {"is_type", METAFN_IS_TYPE, METAFN_KIND_BOOL_INFO,}, +#line 419 "metafns.gperf" + {"is_public", METAFN_IS_PUBLIC, METAFN_KIND_BOOL_INFO,}, +#line 431 "metafns.gperf" + {"is_noexcept", METAFN_IS_NOEXCEPT, METAFN_KIND_BOOL_INFO,}, +#line 514 "metafns.gperf" + {"extract", METAFN_EXTRACT, METAFN_KIND_TEMPLATE_PARM_INFO,}, +#line 637 "metafns.gperf" + {"variant_alternative", METAFN_VARIANT_ALTERNATIVE, METAFN_KIND_INFO_SIZE_T_TINFO,}, +#line 554 "metafns.gperf" + {"is_polymorphic_type", METAFN_IS_POLYMORPHIC_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 421 "metafns.gperf" + {"is_private", METAFN_IS_PRIVATE, METAFN_KIND_BOOL_INFO,}, +#line 455 "metafns.gperf" + {"is_function", METAFN_IS_FUNCTION, METAFN_KIND_BOOL_INFO,}, +#line 452 "metafns.gperf" + {"is_namespace", METAFN_IS_NAMESPACE, METAFN_KIND_BOOL_INFO,}, +#line 606 "metafns.gperf" + {"is_pointer_interconvertible_base_of_type", METAFN_IS_POINTER_INTERCONVERTIBLE_BASE_OF_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, +#line 561 "metafns.gperf" + {"is_bounded_array_type", METAFN_IS_BOUNDED_ARRAY_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 435 "metafns.gperf" + {"is_const", METAFN_IS_CONST, METAFN_KIND_BOOL_INFO,}, +#line 481 "metafns.gperf" + {"is_concept", METAFN_IS_CONCEPT, METAFN_KIND_BOOL_INFO,}, +#line 600 "metafns.gperf" + {"is_same_type", METAFN_IS_SAME_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, +#line 505 "metafns.gperf" + {"bases_of", METAFN_BASES_OF, METAFN_KIND_VECTOR_INFO_INFO_ACCESS_CONTEXT,}, +#line 473 "metafns.gperf" + {"is_function_template", METAFN_IS_FUNCTION_TEMPLATE, METAFN_KIND_BOOL_INFO,}, +#line 586 "metafns.gperf" + {"is_nothrow_assignable_type", METAFN_IS_NOTHROW_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, +#line 456 "metafns.gperf" + {"is_conversion_function", METAFN_IS_CONVERSION_FUNCTION, METAFN_KIND_BOOL_INFO,}, +#line 591 "metafns.gperf" + {"is_nothrow_destructible_type", METAFN_IS_NOTHROW_DESTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 603 "metafns.gperf" + {"is_convertible_type", METAFN_IS_CONVERTIBLE_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, +#line 593 "metafns.gperf" + {"is_implicit_lifetime_type", METAFN_IS_IMPLICIT_LIFETIME_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 592 "metafns.gperf" + {"is_nothrow_relocatable_type", METAFN_IS_NOTHROW_RELOCATABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 472 "metafns.gperf" + {"is_template", METAFN_IS_TEMPLATE, METAFN_KIND_BOOL_INFO,}, +#line 583 "metafns.gperf" + {"is_nothrow_default_constructible_type", METAFN_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 515 "metafns.gperf" + {"can_substitute", METAFN_CAN_SUBSTITUTE, METAFN_KIND_INFO_INFO_REFLECTION_RANGE,}, +#line 477 "metafns.gperf" + {"is_conversion_function_template", METAFN_IS_CONVERSION_FUNCTION_TEMPLATE, METAFN_KIND_BOOL_INFO,}, +#line 444 "metafns.gperf" + {"has_module_linkage", METAFN_HAS_MODULE_LINKAGE, METAFN_KIND_BOOL_INFO,}, +#line 408 "metafns.gperf" + {"symbol_of", METAFN_SYMBOL_OF, METAFN_KIND_STRING_VIEW_OPERATORS,}, +#line 566 "metafns.gperf" + {"is_copy_constructible_type", METAFN_IS_COPY_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 491 "metafns.gperf" + {"has_parent", METAFN_HAS_PARENT, METAFN_KIND_BOOL_INFO,}, +#line 564 "metafns.gperf" + {"is_constructible_type", METAFN_IS_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO_REFLECTION_RANGET,}, +#line 569 "metafns.gperf" + {"is_copy_assignable_type", METAFN_IS_COPY_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 453 "metafns.gperf" + {"is_type_alias", METAFN_IS_TYPE_ALIAS, METAFN_KIND_BOOL_INFO,}, +#line 462 "metafns.gperf" + {"is_copy_constructor", METAFN_IS_COPY_CONSTRUCTOR, METAFN_KIND_BOOL_INFO,}, +#line 634 "metafns.gperf" + {"tuple_size", METAFN_TUPLE_SIZE, METAFN_KIND_SIZE_T_TINFO,}, +#line 498 "metafns.gperf" + {"variable_of", METAFN_VARIABLE_OF, METAFN_KIND_INFO_INFO,}, +#line 539 "metafns.gperf" + {"is_reflection_type", METAFN_IS_REFLECTION_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 513 "metafns.gperf" + {"bit_size_of", METAFN_BIT_SIZE_OF, METAFN_KIND_SIZE_T_INFO,}, +#line 465 "metafns.gperf" + {"is_copy_assignment", METAFN_IS_COPY_ASSIGNMENT, METAFN_KIND_BOOL_INFO,}, +#line 542 "metafns.gperf" + {"is_fundamental_type", METAFN_IS_FUNDAMENTAL_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 605 "metafns.gperf" + {"is_layout_compatible_type", METAFN_IS_LAYOUT_COMPATIBLE_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, +#line 641 "metafns.gperf" + {"current", METAFN_ACCESS_CONTEXT_CURRENT, METAFN_KIND_ACCESS_CONTEXT_VOID,}, +#line 442 "metafns.gperf" + {"has_automatic_storage_duration", METAFN_HAS_AUTOMATIC_STORAGE_DURATION, METAFN_KIND_BOOL_INFO,}, +#line 628 "metafns.gperf" + {"common_type", METAFN_COMMON_TYPE, METAFN_KIND_INFO_REFLECTION_RANGET,}, +#line 480 "metafns.gperf" + {"is_constructor_template", METAFN_IS_CONSTRUCTOR_TEMPLATE, METAFN_KIND_BOOL_INFO,}, +#line 629 "metafns.gperf" + {"common_reference", METAFN_COMMON_REFERENCE, METAFN_KIND_INFO_REFLECTION_RANGET,}, +#line 420 "metafns.gperf" + {"is_protected", METAFN_IS_PROTECTED, METAFN_KIND_BOOL_INFO,}, +#line 572 "metafns.gperf" + {"is_swappable_type", METAFN_IS_SWAPPABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 635 "metafns.gperf" + {"tuple_element", METAFN_TUPLE_ELEMENT, METAFN_KIND_INFO_SIZE_T_TINFO,}, +#line 487 "metafns.gperf" + {"is_nonstatic_data_member", METAFN_IS_NONSTATIC_DATA_MEMBER, METAFN_KIND_BOOL_INFO,}, +#line 590 "metafns.gperf" + {"is_nothrow_swappable_type", METAFN_IS_NOTHROW_SWAPPABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 519 "metafns.gperf" + {"reflect_function", METAFN_REFLECT_FUNCTION, METAFN_KIND_INFO_TEMPLATE_PARM_REF,}, +#line 589 "metafns.gperf" + {"is_nothrow_swappable_with_type", METAFN_IS_NOTHROW_SWAPPABLE_WITH_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, +#line 567 "metafns.gperf" + {"is_move_constructible_type", METAFN_IS_MOVE_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 460 "metafns.gperf" + {"is_constructor", METAFN_IS_CONSTRUCTOR, METAFN_KIND_BOOL_INFO,}, +#line 638 "metafns.gperf" + {"type_order", METAFN_TYPE_ORDER, METAFN_KIND_STRONG_ORDERING_TINFO_TINFO,}, +#line 565 "metafns.gperf" + {"is_default_constructible_type", METAFN_IS_DEFAULT_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 490 "metafns.gperf" + {"has_default_member_initializer", METAFN_HAS_DEFAULT_MEMBER_INITIALIZER, METAFN_KIND_BOOL_INFO,}, +#line 540 "metafns.gperf" + {"is_reference_type", METAFN_IS_REFERENCE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 497 "metafns.gperf" + {"parameters_of", METAFN_PARAMETERS_OF, METAFN_KIND_VECTOR_INFO_INFO,}, +#line 632 "metafns.gperf" + {"unwrap_reference", METAFN_UNWRAP_REFERENCE, METAFN_KIND_INFO_TINFO,}, +#line 546 "metafns.gperf" + {"is_member_pointer_type", METAFN_IS_MEMBER_POINTER_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 570 "metafns.gperf" + {"is_move_assignable_type", METAFN_IS_MOVE_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 544 "metafns.gperf" + {"is_scalar_type", METAFN_IS_SCALAR_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 470 "metafns.gperf" + {"has_default_argument", METAFN_HAS_DEFAULT_ARGUMENT, METAFN_KIND_BOOL_INFO,}, +#line 459 "metafns.gperf" + {"is_special_member_function", METAFN_IS_SPECIAL_MEMBER_FUNCTION, METAFN_KIND_BOOL_INFO,}, +#line 416 "metafns.gperf" + {"type_of", METAFN_TYPE_OF, METAFN_KIND_INFO_INFO,}, +#line 568 "metafns.gperf" + {"is_assignable_type", METAFN_IS_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, +#line 463 "metafns.gperf" + {"is_move_constructor", METAFN_IS_MOVE_CONSTRUCTOR, METAFN_KIND_BOOL_INFO,}, +#line 625 "metafns.gperf" + {"add_pointer", METAFN_ADD_POINTER, METAFN_KIND_INFO_TINFO,}, +#line 464 "metafns.gperf" + {"is_assignment", METAFN_IS_ASSIGNMENT, METAFN_KIND_BOOL_INFO,}, +#line 422 "metafns.gperf" + {"is_virtual", METAFN_IS_VIRTUAL, METAFN_KIND_BOOL_INFO,}, +#line 630 "metafns.gperf" + {"underlying_type", METAFN_UNDERLYING_TYPE, METAFN_KIND_INFO_TINFO,}, +#line 461 "metafns.gperf" + {"is_default_constructor", METAFN_IS_DEFAULT_CONSTRUCTOR, METAFN_KIND_BOOL_INFO,}, +#line 466 "metafns.gperf" + {"is_move_assignment", METAFN_IS_MOVE_ASSIGNMENT, METAFN_KIND_BOOL_INFO,}, +#line 447 "metafns.gperf" + {"has_linkage", METAFN_HAS_LINKAGE, METAFN_KIND_BOOL_INFO,}, +#line 411 "metafns.gperf" + {"identifier_of", METAFN_IDENTIFIER_OF, METAFN_KIND_STRING_VIEW_INFO,}, +#line 550 "metafns.gperf" + {"is_trivially_relocatable_type", METAFN_IS_TRIVIALLY_RELOCATABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 485 "metafns.gperf" + {"is_class_member", METAFN_IS_CLASS_MEMBER, METAFN_KIND_BOOL_INFO,}, +#line 616 "metafns.gperf" + {"add_cv", METAFN_ADD_CV, METAFN_KIND_INFO_TINFO,}, +#line 471 "metafns.gperf" + {"has_ellipsis_parameter", METAFN_HAS_ELLIPSIS_PARAMETER, METAFN_KIND_BOOL_INFO,}, +#line 467 "metafns.gperf" + {"is_destructor", METAFN_IS_DESTRUCTOR, METAFN_KIND_BOOL_INFO,}, +#line 486 "metafns.gperf" + {"is_namespace_member", METAFN_IS_NAMESPACE_MEMBER, METAFN_KIND_BOOL_INFO,}, +#line 504 "metafns.gperf" + {"members_of", METAFN_MEMBERS_OF, METAFN_KIND_VECTOR_INFO_INFO_ACCESS_CONTEXT,}, +#line 549 "metafns.gperf" + {"is_trivially_copyable_type", METAFN_IS_TRIVIALLY_COPYABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 602 "metafns.gperf" + {"is_virtual_base_of_type", METAFN_IS_VIRTUAL_BASE_OF_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, +#line 574 "metafns.gperf" + {"is_trivially_constructible_type", METAFN_IS_TRIVIALLY_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO_REFLECTION_RANGET,}, +#line 511 "metafns.gperf" + {"size_of", METAFN_SIZE_OF, METAFN_KIND_SIZE_T_INFO,}, +#line 579 "metafns.gperf" + {"is_trivially_copy_assignable_type", METAFN_IS_TRIVIALLY_COPY_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 576 "metafns.gperf" + {"is_trivially_copy_constructible_type", METAFN_IS_TRIVIALLY_COPY_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 479 "metafns.gperf" + {"is_literal_operator_template", METAFN_IS_LITERAL_OPERATOR_TEMPLATE, METAFN_KIND_BOOL_INFO,}, +#line 559 "metafns.gperf" + {"is_signed_type", METAFN_IS_SIGNED_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 495 "metafns.gperf" + {"template_of", METAFN_TEMPLATE_OF, METAFN_KIND_INFO_INFO,}, +#line 614 "metafns.gperf" + {"add_const", METAFN_ADD_CONST, METAFN_KIND_INFO_TINFO,}, +#line 426 "metafns.gperf" + {"is_deleted", METAFN_IS_DELETED, METAFN_KIND_BOOL_INFO,}, +#line 475 "metafns.gperf" + {"is_class_template", METAFN_IS_CLASS_TEMPLATE, METAFN_KIND_BOOL_INFO,}, +#line 541 "metafns.gperf" + {"is_arithmetic_type", METAFN_IS_ARITHMETIC_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 516 "metafns.gperf" + {"substitute", METAFN_SUBSTITUTE, METAFN_KIND_INFO_INFO_REFLECTION_RANGE,}, +#line 427 "metafns.gperf" + {"is_defaulted", METAFN_IS_DEFAULTED, METAFN_KIND_BOOL_INFO,}, +#line 500 "metafns.gperf" + {"is_accessible", METAFN_IS_ACCESSIBLE, METAFN_KIND_BOOL_INFO_ACCESS_CONTEXT,}, +#line 423 "metafns.gperf" + {"is_pure_virtual", METAFN_IS_PURE_VIRTUAL, METAFN_KIND_BOOL_INFO,}, +#line 468 "metafns.gperf" + {"is_function_parameter", METAFN_IS_FUNCTION_PARAMETER, METAFN_KIND_BOOL_INFO,}, +#line 425 "metafns.gperf" + {"is_final", METAFN_IS_FINAL, METAFN_KIND_BOOL_INFO,}, +#line 458 "metafns.gperf" + {"is_literal_operator", METAFN_IS_LITERAL_OPERATOR, METAFN_KIND_BOOL_INFO,}, +#line 551 "metafns.gperf" + {"is_replaceable_type", METAFN_IS_REPLACEABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 573 "metafns.gperf" + {"is_destructible_type", METAFN_IS_DESTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 532 "metafns.gperf" + {"is_rvalue_reference_type", METAFN_IS_RVALUE_REFERENCE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 619 "metafns.gperf" + {"add_rvalue_reference", METAFN_ADD_RVALUE_REFERENCE, METAFN_KIND_INFO_TINFO,}, +#line 599 "metafns.gperf" + {"extent", METAFN_EXTENT, METAFN_KIND_SIZE_T_TINFO_UNSIGNED,}, +#line 535 "metafns.gperf" + {"is_enum_type", METAFN_IS_ENUM_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 454 "metafns.gperf" + {"is_namespace_alias", METAFN_IS_NAMESPACE_ALIAS, METAFN_KIND_BOOL_INFO,}, +#line 581 "metafns.gperf" + {"is_trivially_destructible_type", METAFN_IS_TRIVIALLY_DESTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 484 "metafns.gperf" + {"is_structured_binding", METAFN_IS_STRUCTURED_BINDING, METAFN_KIND_BOOL_INFO,}, +#line 575 "metafns.gperf" + {"is_trivially_default_constructible_type", METAFN_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 437 "metafns.gperf" + {"is_mutable_member", METAFN_IS_MUTABLE_MEMBER, METAFN_KIND_BOOL_INFO,}, +#line 563 "metafns.gperf" + {"is_scoped_enum_type", METAFN_IS_SCOPED_ENUM_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 553 "metafns.gperf" + {"is_empty_type", METAFN_IS_EMPTY_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 449 "metafns.gperf" + {"is_enumerable_type", METAFN_IS_ENUMERABLE_TYPE, METAFN_KIND_BOOL_INFO,}, +#line 531 "metafns.gperf" + {"is_lvalue_reference_type", METAFN_IS_LVALUE_REFERENCE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 580 "metafns.gperf" + {"is_trivially_move_assignable_type", METAFN_IS_TRIVIALLY_MOVE_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 492 "metafns.gperf" + {"parent_of", METAFN_PARENT_OF, METAFN_KIND_INFO_INFO,}, +#line 548 "metafns.gperf" + {"is_volatile_type", METAFN_IS_VOLATILE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 577 "metafns.gperf" + {"is_trivially_move_constructible_type", METAFN_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 413 "metafns.gperf" + {"display_string_of", METAFN_DISPLAY_STRING_OF, METAFN_KIND_STRING_VIEW_INFO,}, +#line 432 "metafns.gperf" + {"is_bit_field", METAFN_IS_BIT_FIELD, METAFN_KIND_BOOL_INFO,}, +#line 571 "metafns.gperf" + {"is_swappable_with_type", METAFN_IS_SWAPPABLE_WITH_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, +#line 520 "metafns.gperf" + {"reflect_constant_string", METAFN_REFLECT_CONSTANT_STRING, METAFN_KIND_INFO_INPUT_RANGE,}, +#line 534 "metafns.gperf" + {"is_member_function_pointer_type", METAFN_IS_MEMBER_FUNCTION_POINTER_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 557 "metafns.gperf" + {"is_aggregate_type", METAFN_IS_AGGREGATE_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 523 "metafns.gperf" + {"is_data_member_spec", METAFN_IS_DATA_MEMBER_SPEC, METAFN_KIND_BOOL_INFO,}, +#line 517 "metafns.gperf" + {"reflect_constant", METAFN_REFLECT_CONSTANT, METAFN_KIND_INFO_TEMPLATE_PARM,}, +#line 595 "metafns.gperf" + {"has_unique_object_representations", METAFN_HAS_UNIQUE_OBJECT_REPRESENTATIONS, METAFN_KIND_BOOL_TINFO,}, +#line 578 "metafns.gperf" + {"is_trivially_assignable_type", METAFN_IS_TRIVIALLY_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, +#line 618 "metafns.gperf" + {"add_lvalue_reference", METAFN_ADD_LVALUE_REFERENCE, METAFN_KIND_INFO_TINFO,}, +#line 621 "metafns.gperf" + {"make_unsigned", METAFN_MAKE_UNSIGNED, METAFN_KIND_INFO_TINFO,}, +#line 414 "metafns.gperf" + {"u8display_string_of", METAFN_U8DISPLAY_STRING_OF, METAFN_KIND_U8STRING_VIEW_INFO,}, +#line 493 "metafns.gperf" + {"dealias", METAFN_DEALIAS, METAFN_KIND_INFO_INFO,}, +#line 433 "metafns.gperf" + {"is_enumerator", METAFN_IS_ENUMERATOR, METAFN_KIND_BOOL_INFO,}, +#line 483 "metafns.gperf" + {"is_object", METAFN_IS_OBJECT, METAFN_KIND_BOOL_INFO,}, +#line 547 "metafns.gperf" + {"is_const_type", METAFN_IS_CONST_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 518 "metafns.gperf" + {"reflect_object", METAFN_REFLECT_OBJECT, METAFN_KIND_INFO_TEMPLATE_PARM_REF,}, +#line 430 "metafns.gperf" + {"is_explicit", METAFN_IS_EXPLICIT, METAFN_KIND_BOOL_INFO,}, +#line 476 "metafns.gperf" + {"is_alias_template", METAFN_IS_ALIAS_TEMPLATE, METAFN_KIND_BOOL_INFO,}, +#line 509 "metafns.gperf" + {"enumerators_of", METAFN_ENUMERATORS_OF, METAFN_KIND_VECTOR_INFO_INFO,}, +#line 448 "metafns.gperf" + {"is_complete_type", METAFN_IS_COMPLETE_TYPE, METAFN_KIND_BOOL_INFO,}, +#line 496 "metafns.gperf" + {"template_arguments_of", METAFN_TEMPLATE_ARGUMENTS_OF, METAFN_KIND_VECTOR_INFO_INFO,}, +#line 543 "metafns.gperf" + {"is_object_type", METAFN_IS_OBJECT_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 446 "metafns.gperf" + {"has_c_language_linkage", METAFN_HAS_C_LANGUAGE_LINKAGE, METAFN_KIND_BOOL_INFO,}, +#line 499 "metafns.gperf" + {"return_type_of", METAFN_RETURN_TYPE_OF, METAFN_KIND_INFO_INFO,}, +#line 538 "metafns.gperf" + {"is_function_type", METAFN_IS_FUNCTION_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 418 "metafns.gperf" + {"constant_of", METAFN_CONSTANT_OF, METAFN_KIND_INFO_INFO,}, +#line 439 "metafns.gperf" + {"is_rvalue_reference_qualified", METAFN_IS_RVALUE_REFERENCE_QUALIFIED, METAFN_KIND_BOOL_INFO,}, +#line 429 "metafns.gperf" + {"is_user_declared", METAFN_IS_USER_DECLARED, METAFN_KIND_BOOL_INFO,}, +#line 615 "metafns.gperf" + {"add_volatile", METAFN_ADD_VOLATILE, METAFN_KIND_INFO_TINFO,}, +#line 410 "metafns.gperf" + {"has_identifier", METAFN_HAS_IDENTIFIER, METAFN_KIND_BOOL_INFO,}, +#line 502 "metafns.gperf" + {"has_inaccessible_bases", METAFN_HAS_INACCESSIBLE_BASES, METAFN_KIND_BOOL_INFO_ACCESS_CONTEXT,}, +#line 445 "metafns.gperf" + {"has_external_linkage", METAFN_HAS_EXTERNAL_LINKAGE, METAFN_KIND_BOOL_INFO,}, +#line 503 "metafns.gperf" + {"has_inaccessible_subobjects", METAFN_HAS_INACCESSIBLE_SUBOBJECTS, METAFN_KIND_BOOL_INFO_ACCESS_CONTEXT,}, +#line 594 "metafns.gperf" + {"has_virtual_destructor", METAFN_HAS_VIRTUAL_DESTRUCTOR, METAFN_KIND_BOOL_TINFO,}, +#line 488 "metafns.gperf" + {"is_static_member", METAFN_IS_STATIC_MEMBER, METAFN_KIND_BOOL_INFO,}, +#line 469 "metafns.gperf" + {"is_explicit_object_parameter", METAFN_IS_EXPLICIT_OBJECT_PARAMETER, METAFN_KIND_BOOL_INFO,}, +#line 607 "metafns.gperf" + {"is_invocable_type", METAFN_IS_INVOCABLE_TYPE, METAFN_KIND_BOOL_TINFO_REFLECTION_RANGET,}, +#line 501 "metafns.gperf" + {"has_inaccessible_nonstatic_data_members", METAFN_HAS_INACCESSIBLE_NONSTATIC_DATA_MEMBERS, METAFN_KIND_BOOL_INFO_ACCESS_CONTEXT,}, +#line 438 "metafns.gperf" + {"is_lvalue_reference_qualified", METAFN_IS_LVALUE_REFERENCE_QUALIFIED, METAFN_KIND_BOOL_INFO,}, +#line 417 "metafns.gperf" + {"object_of", METAFN_OBJECT_OF, METAFN_KIND_INFO_INFO,}, +#line 440 "metafns.gperf" + {"has_static_storage_duration", METAFN_HAS_STATIC_STORAGE_DURATION, METAFN_KIND_BOOL_INFO,}, +#line 608 "metafns.gperf" + {"is_invocable_r_type", METAFN_IS_INVOCABLE_R_TYPE, METAFN_KIND_BOOL_TINFO_TINFO_REFLECTION_RANGET,}, +#line 407 "metafns.gperf" + {"operator_of", METAFN_OPERATOR_OF, METAFN_KIND_OPERATORS_INFO,}, +#line 508 "metafns.gperf" + {"subobjects_of", METAFN_SUBOBJECTS_OF, METAFN_KIND_VECTOR_INFO_INFO_ACCESS_CONTEXT,}, +#line 510 "metafns.gperf" + {"offset_of", METAFN_OFFSET_OF, METAFN_KIND_MEMBER_OFFSET_INFO,}, +#line 620 "metafns.gperf" + {"make_signed", METAFN_MAKE_SIGNED, METAFN_KIND_INFO_TINFO,}, +#line 506 "metafns.gperf" + {"static_data_members_of", METAFN_STATIC_DATA_MEMBERS_OF, METAFN_KIND_VECTOR_INFO_INFO_ACCESS_CONTEXT,}, +#line 434 "metafns.gperf" + {"is_annotation", METAFN_IS_ANNOTATION, METAFN_KIND_BOOL_INFO,}, +#line 545 "metafns.gperf" + {"is_compound_type", METAFN_IS_COMPOUND_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 424 "metafns.gperf" + {"is_override", METAFN_IS_OVERRIDE, METAFN_KIND_BOOL_INFO,}, +#line 522 "metafns.gperf" + {"data_member_spec", METAFN_DATA_MEMBER_SPEC, METAFN_KIND_INFO_TINFO_DATA_MEMBER_OPTIONS,}, +#line 597 "metafns.gperf" + {"reference_converts_from_temporary", METAFN_REFERENCE_CONVERTS_FROM_TEMPORARY, METAFN_KIND_BOOL_TINFO_TINFO,}, +#line 613 "metafns.gperf" + {"remove_cv", METAFN_REMOVE_CV, METAFN_KIND_INFO_TINFO,}, +#line 443 "metafns.gperf" + {"has_internal_linkage", METAFN_HAS_INTERNAL_LINKAGE, METAFN_KIND_BOOL_INFO,}, +#line 537 "metafns.gperf" + {"is_class_type", METAFN_IS_CLASS_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 457 "metafns.gperf" + {"is_operator_function", METAFN_IS_OPERATOR_FUNCTION, METAFN_KIND_BOOL_INFO,}, +#line 617 "metafns.gperf" + {"remove_reference", METAFN_REMOVE_REFERENCE, METAFN_KIND_INFO_TINFO,}, +#line 528 "metafns.gperf" + {"is_floating_point_type", METAFN_IS_FLOATING_POINT_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 552 "metafns.gperf" + {"is_standard_layout_type", METAFN_IS_STANDARD_LAYOUT_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 533 "metafns.gperf" + {"is_member_object_pointer_type", METAFN_IS_MEMBER_OBJECT_POINTER_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 558 "metafns.gperf" + {"is_consteval_only_type", METAFN_IS_CONSTEVAL_ONLY_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 478 "metafns.gperf" + {"is_operator_function_template", METAFN_IS_OPERATOR_FUNCTION_TEMPLATE, METAFN_KIND_BOOL_INFO,}, +#line 622 "metafns.gperf" + {"remove_extent", METAFN_REMOVE_EXTENT, METAFN_KIND_INFO_TINFO,}, +#line 494 "metafns.gperf" + {"has_template_arguments", METAFN_HAS_TEMPLATE_ARGUMENTS, METAFN_KIND_BOOL_INFO,}, +#line 556 "metafns.gperf" + {"is_final_type", METAFN_IS_FINAL_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 529 "metafns.gperf" + {"is_array_type", METAFN_IS_ARRAY_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 596 "metafns.gperf" + {"reference_constructs_from_temporary", METAFN_REFERENCE_CONSTRUCTS_FROM_TEMPORARY, METAFN_KIND_BOOL_TINFO_TINFO,}, +#line 507 "metafns.gperf" + {"nonstatic_data_members_of", METAFN_NONSTATIC_DATA_MEMBERS_OF, METAFN_KIND_VECTOR_INFO_INFO_ACCESS_CONTEXT,}, +#line 631 "metafns.gperf" + {"invoke_result", METAFN_INVOKE_RESULT, METAFN_KIND_INFO_TINFO_REFLECTION_RANGET,}, +#line 626 "metafns.gperf" + {"remove_cvref", METAFN_REMOVE_CVREF, METAFN_KIND_INFO_TINFO,}, +#line 627 "metafns.gperf" + {"decay", METAFN_DECAY, METAFN_KIND_INFO_TINFO,}, +#line 555 "metafns.gperf" + {"is_abstract_type", METAFN_IS_ABSTRACT_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 633 "metafns.gperf" + {"unwrap_ref_decay", METAFN_UNWRAP_REF_DECAY, METAFN_KIND_INFO_TINFO,}, +#line 441 "metafns.gperf" + {"has_thread_storage_duration", METAFN_HAS_THREAD_STORAGE_DURATION, METAFN_KIND_BOOL_INFO,}, +#line 624 "metafns.gperf" + {"remove_pointer", METAFN_REMOVE_POINTER, METAFN_KIND_INFO_TINFO,}, +#line 409 "metafns.gperf" + {"u8symbol_of", METAFN_U8SYMBOL_OF, METAFN_KIND_U8STRING_VIEW_OPERATORS,}, +#line 611 "metafns.gperf" + {"remove_const", METAFN_REMOVE_CONST, METAFN_KIND_INFO_TINFO,}, +#line 623 "metafns.gperf" + {"remove_all_extents", METAFN_REMOVE_ALL_EXTENTS, METAFN_KIND_INFO_TINFO,}, +#line 524 "metafns.gperf" + {"define_aggregate", METAFN_DEFINE_AGGREGATE, METAFN_KIND_INFO_INFO_REFLECTION_RANGE,}, +#line 562 "metafns.gperf" + {"is_unbounded_array_type", METAFN_IS_UNBOUNDED_ARRAY_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 521 "metafns.gperf" + {"reflect_constant_array", METAFN_REFLECT_CONSTANT_ARRAY, METAFN_KIND_INFO_INPUT_RANGE,}, +#line 412 "metafns.gperf" + {"u8identifier_of", METAFN_U8IDENTIFIER_OF, METAFN_KIND_U8STRING_VIEW_INFO,}, +#line 428 "metafns.gperf" + {"is_user_provided", METAFN_IS_USER_PROVIDED, METAFN_KIND_BOOL_INFO,}, +#line 527 "metafns.gperf" + {"is_integral_type", METAFN_IS_INTEGRAL_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 415 "metafns.gperf" + {"source_location_of", METAFN_SOURCE_LOCATION_OF, METAFN_KIND_SOURCE_LOCATION_INFO,}, +#line 612 "metafns.gperf" + {"remove_volatile", METAFN_REMOVE_VOLATILE, METAFN_KIND_INFO_TINFO,}, +#line 640 "metafns.gperf" + {"annotations_of_with_type", METAFN_ANNOTATIONS_OF_WITH_TYPE, METAFN_KIND_VECTOR_INFO_INFO_INFO,}, +#line 536 "metafns.gperf" + {"is_union_type", METAFN_IS_UNION_TYPE, METAFN_KIND_BOOL_TINFO,}, +#line 512 "metafns.gperf" + {"alignment_of", METAFN_ALIGNMENT_OF, METAFN_KIND_SIZE_T_INFO,}, +#line 639 "metafns.gperf" + {"annotations_of", METAFN_ANNOTATIONS_OF, METAFN_KIND_VECTOR_INFO_INFO,}, +#line 560 "metafns.gperf" + {"is_unsigned_type", METAFN_IS_UNSIGNED_TYPE, METAFN_KIND_BOOL_TINFO,} + }; + + static const short lookup[] = + { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, + -1, -1, 1, -1, -1, 2, 3, -1, 4, -1, + -1, -1, 5, -1, -1, -1, 6, 7, -1, 8, + 9, 10, 11, -1, 12, 13, 14, -1, -1, 15, + 16, -1, 17, -1, -1, 18, -1, 19, -1, 20, + -1, 21, 22, -1, 23, -1, -1, -1, -1, 24, + 25, 26, 27, -1, -1, 28, 29, -1, 30, -1, + 31, -1, 32, 33, -1, -1, -1, -1, -1, -1, + 34, 35, 36, 37, 38, 39, -1, 40, -1, -1, + -1, 41, 42, -1, 43, -1, 44, -1, 45, 46, + -1, 47, -1, -1, -1, 48, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 49, -1, 50, -1, + -1, -1, -1, 51, 52, 53, 54, -1, 55, -1, + -1, 56, -1, 57, 58, 59, -1, 60, -1, -1, + 61, 62, -1, 63, -1, -1, 64, 65, -1, -1, + -1, -1, 66, 67, 68, 69, 70, -1, -1, -1, + 71, 72, -1, -1, 73, 74, -1, -1, -1, 75, + 76, -1, 77, 78, -1, -1, 79, 80, 81, 82, + 83, 84, 85, 86, 87, -1, 88, -1, 89, 90, + 91, -1, 92, 93, -1, -1, 94, -1, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, -1, -1, + -1, 105, 106, 107, -1, -1, 108, 109, 110, -1, + -1, 111, -1, -1, 112, 113, -1, 114, 115, -1, + 116, -1, 117, 118, -1, 119, 120, 121, 122, 123, + 124, -1, -1, -1, 125, 126, 127, 128, 129, -1, + 130, 131, -1, -1, -1, -1, -1, -1, -1, 132, + -1, -1, 133, -1, 134, -1, -1, 135, 136, 137, + -1, -1, -1, 138, 139, 140, 141, 142, -1, -1, + -1, 143, 144, 145, -1, -1, 146, 147, -1, 148, + -1, 149, 150, 151, -1, 152, -1, -1, 153, 154, + -1, 155, -1, 156, 157, -1, -1, 158, 159, -1, + 160, -1, 161, -1, 162, 163, 164, -1, -1, 165, + -1, -1, 166, -1, 167, 168, 169, -1, -1, 170, + -1, 171, 172, 173, -1, -1, 174, -1, -1, -1, + 175, 176, 177, -1, -1, -1, 178, 179, -1, -1, + -1, -1, 180, 181, 182, -1, -1, -1, -1, 183, + -1, -1, 184, -1, 185, -1, -1, -1, -1, -1, + -1, 186, -1, -1, -1, -1, -1, -1, 187, 188, + -1, 189, -1, -1, -1, -1, 190, -1, 191, -1, + -1, -1, -1, -1, -1, 192, 193, -1, -1, -1, + -1, 194, 195, -1, 196, -1, -1, -1, -1, 197, + -1, -1, 198, -1, -1, 199, 200, -1, -1, -1, + -1, -1, 201, 202, 203, -1, -1, 204, -1, 205, + -1, -1, -1, 206, -1, -1, -1, 207, -1, -1, + -1, 208, -1, -1, -1, -1, -1, 209, -1, -1, + -1, -1, -1, -1, 210, 211, -1, -1, 212, -1, + -1, -1, 213, -1, 214, 215, -1, -1, -1, -1, + 216, -1, 217, -1, 218, -1, -1, -1, -1, -1, + 219, -1, 220, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 221, -1, -1, 222, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 223, -1, -1, 224, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 225, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 226, -1, -1, -1, -1, -1, -1, -1, -1, + 227, -1, -1, 228, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 229, -1, -1, -1, -1, -1, -1, -1, -1, 230, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 231, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 232, -1, 233, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 234 + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + unsigned int key = hash (str, len); + + if (key <= MAX_HASH_VALUE) + { + int index = lookup[key]; + + if (index >= 0) + { + const char *s = wordlist[index].name; + + if (*str == *s && !strcmp (str + 1, s + 1)) + return &wordlist[index]; + } + } + } + return 0; +} diff --git a/gcc/cp/reflect.cc b/gcc/cp/reflect.cc index 7034f1c762a..c75bab6fda3 100644 --- a/gcc/cp/reflect.cc +++ b/gcc/cp/reflect.cc @@ -1,4 +1,4 @@ -/* C++ reflection code. + /* C++ reflection code. Copyright (C) 2025 Free Software Foundation, Inc. Written by Marek Polacek @@ -30,10 +30,8 @@ along with GCC; see the file COPYING3. If not see #include "c-family/c-pragma.h" // for parse_in #include "gimplify.h" // for unshare_expr -static tree eval_is_function_type (location_t, const constexpr_ctx *, tree, - tree *); -static tree eval_is_object_type (location_t, const constexpr_ctx *, tree, - tree *); +static tree eval_is_function_type (tree); +static tree eval_is_object_type (location_t, tree); static tree eval_reflect_constant (location_t, const constexpr_ctx *, tree, tree, tree *); struct constexpr_ctx; @@ -2498,8 +2496,7 @@ eval_dealias (location_t loc, const constexpr_ctx *ctx, tree r, for templates cannot be answered. */ static tree -eval_is_noexcept (location_t loc, const constexpr_ctx *ctx, tree r, - tree *jump_target) +eval_is_noexcept (tree r) { if (eval_is_function (r) == boolean_true_node) { @@ -2521,7 +2518,7 @@ eval_is_noexcept (location_t loc, const constexpr_ctx *ctx, tree r, } if (eval_is_type (r) == boolean_true_node - && eval_is_function_type (loc, ctx, r, jump_target) == boolean_true_node) + && eval_is_function_type (r) == boolean_true_node) { if (TYPE_NOTHROW_P (r)) return boolean_true_node; @@ -2756,8 +2753,7 @@ eval_parameters_of (location_t loc, const constexpr_ctx *ctx, tree r, { if (eval_is_function (r) != boolean_true_node && (eval_is_type (r) != boolean_true_node - || eval_is_function_type (loc, ctx, r, - jump_target) != boolean_true_node)) + || eval_is_function_type (r) != boolean_true_node)) return throw_exception_nofn (loc, ctx, r, jump_target); r = MAYBE_BASELINK_FUNCTIONS (r); @@ -2807,8 +2803,7 @@ eval_return_type_of (location_t loc, const constexpr_ctx *ctx, tree r, { if ((eval_is_function (r) != boolean_true_node || !has_type (r, kind)) && (eval_is_type (r) != boolean_true_node - || eval_is_function_type (loc, ctx, r, - jump_target) != boolean_true_node)) + || eval_is_function_type (r) != boolean_true_node)) return throw_exception_nofn (loc, ctx, r, jump_target); r = MAYBE_BASELINK_FUNCTIONS (r); @@ -3524,7 +3519,7 @@ static tree eval_reflect_object (location_t loc, const constexpr_ctx *ctx, tree type, tree expr, tree *jump_target) { - if (eval_is_object_type (loc, ctx, type, jump_target) != boolean_true_node) + if (eval_is_object_type (loc, type) != boolean_true_node) { error_at (loc, "%qT must be an object type", TREE_TYPE (type)); return error_mark_node; @@ -3549,7 +3544,7 @@ static tree eval_reflect_function (location_t loc, const constexpr_ctx *ctx, tree type, tree expr, tree *jump_target) { - if (eval_is_function_type (loc, ctx, type, jump_target) != boolean_true_node) + if (eval_is_function_type (type) != boolean_true_node) { error_at (loc, "%qT must be a function type", TREE_TYPE (type)); return error_mark_node; @@ -3577,14 +3572,9 @@ eval_reflect_function (location_t loc, const constexpr_ctx *ctx, tree type, arguments to the trait. */ static tree -eval_type_trait (location_t loc, const constexpr_ctx *ctx, tree type1, - tree type2, cp_trait_kind kind, tree *jump_target) +eval_type_trait (location_t loc, tree type1, tree type2, cp_trait_kind kind) { - if (eval_is_type (type1) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type1, jump_target); - else if (type2 && eval_is_type (type2) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type2, jump_target); - tree r = finish_trait_expr (input_location, kind, type1, type2); + tree r = finish_trait_expr (loc, kind, type1, type2); STRIP_ANY_LOCATION_WRAPPER (r); return r; } @@ -3592,20 +3582,16 @@ eval_type_trait (location_t loc, const constexpr_ctx *ctx, tree type1, /* Like above, but for type traits that take only one type. */ static tree -eval_type_trait (location_t loc, const constexpr_ctx *ctx, tree type, - cp_trait_kind kind, tree *jump_target) +eval_type_trait (location_t loc, tree type, cp_trait_kind kind) { - return eval_type_trait (loc, ctx, type, NULL_TREE, kind, jump_target); + return eval_type_trait (loc, type, NULL_TREE, kind); } /* Process std::meta::is_function_type. */ static tree -eval_is_function_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_function_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (FUNC_OR_METHOD_TYPE_P (type)) return boolean_true_node; else @@ -3615,11 +3601,8 @@ eval_is_function_type (location_t loc, const constexpr_ctx *ctx, tree type, /* Process std::meta::is_void_type. */ static tree -eval_is_void_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_void_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (VOID_TYPE_P (type)) return boolean_true_node; else @@ -3629,11 +3612,8 @@ eval_is_void_type (location_t loc, const constexpr_ctx *ctx, tree type, /* Process std::meta::is_null_pointer_type. */ static tree -eval_is_null_pointer_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_null_pointer_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (NULLPTR_TYPE_P (type)) return boolean_true_node; else @@ -3643,11 +3623,8 @@ eval_is_null_pointer_type (location_t loc, const constexpr_ctx *ctx, tree type, /* Process std::meta::is_integral_type. */ static tree -eval_is_integral_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_integral_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (CP_INTEGRAL_TYPE_P (type)) return boolean_true_node; else @@ -3657,11 +3634,8 @@ eval_is_integral_type (location_t loc, const constexpr_ctx *ctx, tree type, /* Process std::meta::is_floating_point_type. */ static tree -eval_is_floating_point_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_floating_point_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (FLOAT_TYPE_P (type)) return boolean_true_node; else @@ -3671,29 +3645,24 @@ eval_is_floating_point_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_array_type. */ static tree -eval_is_array_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_array_type (location_t loc, tree type) { - return eval_type_trait (loc, ctx, type, CPTK_IS_ARRAY, jump_target); + return eval_type_trait (loc, type, CPTK_IS_ARRAY); } /* Process std::meta::is_pointer_type. */ static tree -eval_is_pointer_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_pointer_type (location_t loc, tree type) { - return eval_type_trait (loc, ctx, type, CPTK_IS_POINTER, jump_target); + return eval_type_trait (loc, type, CPTK_IS_POINTER); } /* Process std::meta::is_lvalue_reference_type. */ static tree -eval_is_lvalue_reference_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_lvalue_reference_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (TYPE_REF_P (type) && !TYPE_REF_IS_RVALUE (type)) return boolean_true_node; else @@ -3703,11 +3672,8 @@ eval_is_lvalue_reference_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_rvalue_reference_type. */ static tree -eval_is_rvalue_reference_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_rvalue_reference_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (TYPE_REF_P (type) && TYPE_REF_IS_RVALUE (type)) return boolean_true_node; else @@ -3717,58 +3683,48 @@ eval_is_rvalue_reference_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_member_object_pointer_type. */ static tree -eval_is_member_object_pointer_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_member_object_pointer_type (location_t loc, tree type) { - return eval_type_trait (loc, ctx, type, CPTK_IS_MEMBER_OBJECT_POINTER, - jump_target); + return eval_type_trait (loc, type, CPTK_IS_MEMBER_OBJECT_POINTER); } /* Process std::meta::is_member_function_pointer_type. */ static tree -eval_is_member_function_pointer_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_member_function_pointer_type (location_t loc, tree type) { - return eval_type_trait (loc, ctx, type, CPTK_IS_MEMBER_FUNCTION_POINTER, - jump_target); + return eval_type_trait (loc, type, CPTK_IS_MEMBER_FUNCTION_POINTER); } /* Process std::meta::is_enum_type. */ static tree -eval_is_enum_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_enum_type (location_t loc, tree type) { - return eval_type_trait (loc, ctx, type, CPTK_IS_ENUM, jump_target); + return eval_type_trait (loc, type, CPTK_IS_ENUM); } /* Process std::meta::is_union_type. */ static tree -eval_is_union_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_union_type (location_t loc, tree type) { - return eval_type_trait (loc, ctx, type, CPTK_IS_UNION, jump_target); + return eval_type_trait (loc, type, CPTK_IS_UNION); } /* Process std::meta::is_class_type. */ static tree -eval_is_class_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_class_type (location_t loc, tree type) { - return eval_type_trait (loc, ctx, type, CPTK_IS_CLASS, jump_target); + return eval_type_trait (loc, type, CPTK_IS_CLASS); } /* Process std::meta::is_reflection_type. */ static tree -eval_is_reflection_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_reflection_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (REFLECTION_TYPE_P (type)) return boolean_true_node; else @@ -3778,20 +3734,16 @@ eval_is_reflection_type (location_t loc, const constexpr_ctx *ctx, tree type, /* Process std::meta::is_reference_type. */ static tree -eval_is_reference_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_reference_type (location_t loc, tree type) { - return eval_type_trait (loc, ctx, type, CPTK_IS_REFERENCE, jump_target); + return eval_type_trait (loc, type, CPTK_IS_REFERENCE); } /* Process std::meta::is_arithmetic_type. */ static tree -eval_is_arithmetic_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_arithmetic_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (ARITHMETIC_TYPE_P (type)) return boolean_true_node; else @@ -3801,20 +3753,16 @@ eval_is_arithmetic_type (location_t loc, const constexpr_ctx *ctx, tree type, /* Process std::meta::is_object_type. */ static tree -eval_is_object_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_object_type (location_t loc, tree type) { - return eval_type_trait (loc, ctx, type, CPTK_IS_OBJECT, jump_target); + return eval_type_trait (loc, type, CPTK_IS_OBJECT); } /* Process std::meta::is_scalar_type. */ static tree -eval_is_scalar_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_scalar_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (SCALAR_TYPE_P (type)) return boolean_true_node; else @@ -3824,11 +3772,8 @@ eval_is_scalar_type (location_t loc, const constexpr_ctx *ctx, tree type, /* Process std::meta::is_fundamental_type. */ static tree -eval_is_fundamental_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_fundamental_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (ARITHMETIC_TYPE_P (type) || VOID_TYPE_P (type) || NULLPTR_TYPE_P (type) @@ -3841,35 +3786,27 @@ eval_is_fundamental_type (location_t loc, const constexpr_ctx *ctx, tree type, /* Process std::meta::is_compound_type. */ static tree -eval_is_compound_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_compound_type (tree type) { - tree fundamental = eval_is_fundamental_type (loc, ctx, type, jump_target); - if (fundamental == boolean_false_node) + if (eval_is_fundamental_type (type) == boolean_false_node) return boolean_true_node; - else if (fundamental == boolean_true_node) - return boolean_false_node; else - return fundamental; + return boolean_false_node; } /* Process std::meta::is_member_pointer_type. */ static tree -eval_is_member_pointer_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_member_pointer_type (location_t loc, tree type) { - return eval_type_trait (loc, ctx, type, CPTK_IS_MEMBER_POINTER, jump_target); + return eval_type_trait (loc, type, CPTK_IS_MEMBER_POINTER); } /* Process std::meta::is_const_type. */ static tree -eval_is_const_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_const_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (CP_TYPE_CONST_P (type)) return boolean_true_node; else @@ -3879,11 +3816,8 @@ eval_is_const_type (location_t loc, const constexpr_ctx *ctx, tree type, /* Process std::meta::is_volatile_type. */ static tree -eval_is_volatile_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_volatile_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (CP_TYPE_VOLATILE_P (type)) return boolean_true_node; else @@ -3893,11 +3827,8 @@ eval_is_volatile_type (location_t loc, const constexpr_ctx *ctx, tree type, /* Process std::meta::is_trivially_copyable_type. */ static tree -eval_is_trivially_copyable_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_trivially_copyable_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (trivially_copyable_p (type)) return boolean_true_node; else @@ -3907,11 +3838,8 @@ eval_is_trivially_copyable_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_trivially_relocatable_type. */ static tree -eval_is_trivially_relocatable_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_trivially_relocatable_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (trivially_relocatable_type_p (type)) return boolean_true_node; else @@ -3921,11 +3849,8 @@ eval_is_trivially_relocatable_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_replaceable_type. */ static tree -eval_is_replaceable_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_replaceable_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (replaceable_type_p (type)) return boolean_true_node; else @@ -3935,11 +3860,8 @@ eval_is_replaceable_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_standard_layout_type. */ static tree -eval_is_standard_layout_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_standard_layout_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (std_layout_type_p (type)) return boolean_true_node; else @@ -3949,29 +3871,24 @@ eval_is_standard_layout_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_empty_type. */ static tree -eval_is_empty_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_empty_type (location_t loc, tree type) { - return eval_type_trait (loc, ctx, type, CPTK_IS_EMPTY, jump_target); + return eval_type_trait (loc, type, CPTK_IS_EMPTY); } /* Process std::meta::is_polymorphic_type. */ static tree -eval_is_polymorphic_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_polymorphic_type (location_t loc, tree type) { - return eval_type_trait (loc, ctx, type, CPTK_IS_POLYMORPHIC, jump_target); + return eval_type_trait (loc, type, CPTK_IS_POLYMORPHIC); } /* Process std::meta::is_abstract_type. */ static tree -eval_is_abstract_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_abstract_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (ABSTRACT_CLASS_TYPE_P (type)) return boolean_true_node; else @@ -3981,20 +3898,16 @@ eval_is_abstract_type (location_t loc, const constexpr_ctx *ctx, tree type, /* Process std::meta::is_final_type. */ static tree -eval_is_final_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_final_type (location_t loc, tree type) { - return eval_type_trait (loc, ctx, type, CPTK_IS_FINAL, jump_target); + return eval_type_trait (loc, type, CPTK_IS_FINAL); } /* Process std::meta::is_aggregate_type. */ static tree -eval_is_aggregate_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_aggregate_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (CP_AGGREGATE_TYPE_P (type)) return boolean_true_node; else @@ -4004,11 +3917,8 @@ eval_is_aggregate_type (location_t loc, const constexpr_ctx *ctx, tree type, /* Process std::meta::is_consteval_only_type. */ static tree -eval_is_consteval_only_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_consteval_only_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (consteval_only_p (type)) return boolean_true_node; else @@ -4018,11 +3928,8 @@ eval_is_consteval_only_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_signed_type. */ static tree -eval_is_signed_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_signed_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (ARITHMETIC_TYPE_P (type) && !TYPE_UNSIGNED (type)) return boolean_true_node; else @@ -4032,11 +3939,8 @@ eval_is_signed_type (location_t loc, const constexpr_ctx *ctx, tree type, /* Process std::meta::is_unsigned_type. */ static tree -eval_is_unsigned_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_unsigned_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (ARITHMETIC_TYPE_P (type) && TYPE_UNSIGNED (type)) return boolean_true_node; else @@ -4046,20 +3950,16 @@ eval_is_unsigned_type (location_t loc, const constexpr_ctx *ctx, tree type, /* Process std::meta::is_bounded_array_type. */ static tree -eval_is_bounded_array_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_bounded_array_type (location_t loc, tree type) { - return eval_type_trait (loc, ctx, type, CPTK_IS_BOUNDED_ARRAY, jump_target); + return eval_type_trait (loc, type, CPTK_IS_BOUNDED_ARRAY); } /* Process std::meta::is_unbounded_array_type. */ static tree -eval_is_unbounded_array_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_unbounded_array_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (array_of_unknown_bound_p (type)) return boolean_true_node; else @@ -4069,11 +3969,8 @@ eval_is_unbounded_array_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_scoped_enum_type. */ static tree -eval_is_scoped_enum_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_scoped_enum_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (SCOPED_ENUM_P (type)) return boolean_true_node; else @@ -4083,11 +3980,8 @@ eval_is_scoped_enum_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_constructible_type. */ static tree -eval_is_constructible_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree tvec, tree *jump_target) +eval_is_constructible_type (tree type, tree tvec) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (is_xible (INIT_EXPR, type, tvec)) return boolean_true_node; else @@ -4097,11 +3991,8 @@ eval_is_constructible_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_default_constructible_type. */ static tree -eval_is_default_constructible_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_default_constructible_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (is_xible (INIT_EXPR, type, make_tree_vec (0))) return boolean_true_node; else @@ -4111,11 +4002,8 @@ eval_is_default_constructible_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_copy_constructible_type. */ static tree -eval_is_copy_constructible_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_copy_constructible_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); tree arg = make_tree_vec (1); tree ctype = cp_build_qualified_type (type, cp_type_quals (type) | TYPE_QUAL_CONST); @@ -4129,11 +4017,8 @@ eval_is_copy_constructible_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_move_constructible_type. */ static tree -eval_is_move_constructible_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_move_constructible_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); tree arg = make_tree_vec (1); TREE_VEC_ELT (arg, 0) = cp_build_reference_type (type, /*rval=*/true); if (is_xible (INIT_EXPR, type, arg)) @@ -4145,21 +4030,16 @@ eval_is_move_constructible_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_assignable_type. */ static tree -eval_is_assignable_type (location_t loc, const constexpr_ctx *ctx, tree type1, - tree type2, tree *jump_target) +eval_is_assignable_type (location_t loc, tree type1, tree type2) { - return eval_type_trait (loc, ctx, type1, type2, CPTK_IS_ASSIGNABLE, - jump_target); + return eval_type_trait (loc, type1, type2, CPTK_IS_ASSIGNABLE); } /* Process std::meta::is_copy_assignable_type. */ static tree -eval_is_copy_assignable_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_copy_assignable_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); tree type1 = cp_build_reference_type (type, /*rval=*/false); tree type2 = cp_build_qualified_type (type, cp_type_quals (type) | TYPE_QUAL_CONST); @@ -4173,11 +4053,8 @@ eval_is_copy_assignable_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_move_assignable_type. */ static tree -eval_is_move_assignable_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_move_assignable_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); tree type1 = cp_build_reference_type (type, /*rval=*/false); tree type2 = cp_build_reference_type (type, /*rval=*/true); if (is_xible (MODIFY_EXPR, type1, type2)) @@ -4189,20 +4066,16 @@ eval_is_move_assignable_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_destructible_type. */ static tree -eval_is_destructible_type (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_destructible_type (location_t loc, tree type) { - return eval_type_trait (loc, ctx, type, CPTK_IS_DESTRUCTIBLE, jump_target); + return eval_type_trait (loc, type, CPTK_IS_DESTRUCTIBLE); } /* Process std::meta::is_trivially_constructible_type. */ static tree -eval_is_trivially_constructible_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree tvec, tree *jump_target) +eval_is_trivially_constructible_type (tree type, tree tvec) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (is_trivially_xible (INIT_EXPR, type, tvec)) return boolean_true_node; else @@ -4212,12 +4085,8 @@ eval_is_trivially_constructible_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_trivially_default_constructible_type. */ static tree -eval_is_trivially_default_constructible_type (location_t loc, - const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_trivially_default_constructible_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (is_trivially_xible (INIT_EXPR, type, make_tree_vec (0))) return boolean_true_node; else @@ -4227,12 +4096,8 @@ eval_is_trivially_default_constructible_type (location_t loc, /* Process std::meta::is_trivially_copy_constructible_type. */ static tree -eval_is_trivially_copy_constructible_type (location_t loc, - const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_trivially_copy_constructible_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); tree arg = make_tree_vec (1); tree ctype = cp_build_qualified_type (type, cp_type_quals (type) | TYPE_QUAL_CONST); @@ -4246,12 +4111,8 @@ eval_is_trivially_copy_constructible_type (location_t loc, /* Process std::meta::is_trivially_move_constructible_type. */ static tree -eval_is_trivially_move_constructible_type (location_t loc, - const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_trivially_move_constructible_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); tree arg = make_tree_vec (1); TREE_VEC_ELT (arg, 0) = cp_build_reference_type (type, /*rval=*/true); if (is_trivially_xible (INIT_EXPR, type, arg)) @@ -4263,22 +4124,16 @@ eval_is_trivially_move_constructible_type (location_t loc, /* Process std::meta::is_trivially_assignable_type. */ static tree -eval_is_trivially_assignable_type (location_t loc, const constexpr_ctx *ctx, - tree type1, tree type2, tree *jump_target) +eval_is_trivially_assignable_type (location_t loc, tree type1, tree type2) { - return eval_type_trait (loc, ctx, type1, type2, CPTK_IS_TRIVIALLY_ASSIGNABLE, - jump_target); + return eval_type_trait (loc, type1, type2, CPTK_IS_TRIVIALLY_ASSIGNABLE); } /* Process std::meta::is_trivially_copy_assignable_type. */ static tree -eval_is_trivially_copy_assignable_type (location_t loc, - const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_trivially_copy_assignable_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); tree type1 = cp_build_reference_type (type, /*rval=*/false); tree type2 = cp_build_qualified_type (type, cp_type_quals (type) | TYPE_QUAL_CONST); @@ -4292,12 +4147,8 @@ eval_is_trivially_copy_assignable_type (location_t loc, /* Process std::meta::is_trivially_move_assignable_type. */ static tree -eval_is_trivially_move_assignable_type (location_t loc, - const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_trivially_move_assignable_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); tree type1 = cp_build_reference_type (type, /*rval=*/false); tree type2 = cp_build_reference_type (type, /*rval=*/true); if (is_trivially_xible (MODIFY_EXPR, type1, type2)) @@ -4309,21 +4160,16 @@ eval_is_trivially_move_assignable_type (location_t loc, /* Process std::meta::is_trivially_destructible_type. */ static tree -eval_is_trivially_destructible_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_trivially_destructible_type (location_t loc, tree type) { - return eval_type_trait (loc, ctx, type, CPTK_IS_TRIVIALLY_DESTRUCTIBLE, - jump_target); + return eval_type_trait (loc, type, CPTK_IS_TRIVIALLY_DESTRUCTIBLE); } /* Process std::meta::is_nothrow_constructible_type. */ static tree -eval_is_nothrow_constructible_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree tvec, tree *jump_target) +eval_is_nothrow_constructible_type (tree type, tree tvec) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (is_nothrow_xible (INIT_EXPR, type, tvec)) return boolean_true_node; else @@ -4333,12 +4179,8 @@ eval_is_nothrow_constructible_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_nothrow_default_constructible_type. */ static tree -eval_is_nothrow_default_constructible_type (location_t loc, - const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_nothrow_default_constructible_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (is_nothrow_xible (INIT_EXPR, type, make_tree_vec (0))) return boolean_true_node; else @@ -4348,12 +4190,8 @@ eval_is_nothrow_default_constructible_type (location_t loc, /* Process std::meta::is_nothrow_copy_constructible_type. */ static tree -eval_is_nothrow_copy_constructible_type (location_t loc, - const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_nothrow_copy_constructible_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); tree arg = make_tree_vec (1); tree ctype = cp_build_qualified_type (type, cp_type_quals (type) | TYPE_QUAL_CONST); @@ -4367,12 +4205,8 @@ eval_is_nothrow_copy_constructible_type (location_t loc, /* Process std::meta::is_nothrow_move_constructible_type. */ static tree -eval_is_nothrow_move_constructible_type (location_t loc, - const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_nothrow_move_constructible_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); tree arg = make_tree_vec (1); TREE_VEC_ELT (arg, 0) = cp_build_reference_type (type, /*rval=*/true); if (is_nothrow_xible (INIT_EXPR, type, arg)) @@ -4384,22 +4218,16 @@ eval_is_nothrow_move_constructible_type (location_t loc, /* Process std::meta::is_nothrow_assignable_type. */ static tree -eval_is_nothrow_assignable_type (location_t loc, const constexpr_ctx *ctx, - tree type1, tree type2, tree *jump_target) +eval_is_nothrow_assignable_type (location_t loc, tree type1, tree type2) { - return eval_type_trait (loc, ctx, type1, type2, CPTK_IS_NOTHROW_ASSIGNABLE, - jump_target); + return eval_type_trait (loc, type1, type2, CPTK_IS_NOTHROW_ASSIGNABLE); } /* Process std::meta::is_nothrow_copy_assignable_type. */ static tree -eval_is_nothrow_copy_assignable_type (location_t loc, - const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_is_nothrow_copy_assignable_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); tree type1 = cp_build_reference_type (type, /*rval=*/false); tree type2 = cp_build_qualified_type (type, cp_type_quals (type) | TYPE_QUAL_CONST); @@ -4413,11 +4241,8 @@ eval_is_nothrow_copy_assignable_type (location_t loc, /* Process std::meta::is_nothrow_move_assignable_type. */ static tree -eval_is_nothrow_move_assignable_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_nothrow_move_assignable_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); tree type1 = cp_build_reference_type (type, /*rval=*/false); tree type2 = cp_build_reference_type (type, /*rval=*/true); if (is_nothrow_xible (MODIFY_EXPR, type1, type2)) @@ -4429,31 +4254,24 @@ eval_is_nothrow_move_assignable_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_nothrow_destructible_type. */ static tree -eval_is_nothrow_destructible_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_nothrow_destructible_type (location_t loc, tree type) { - return eval_type_trait (loc, ctx, type, CPTK_IS_NOTHROW_DESTRUCTIBLE, - jump_target); + return eval_type_trait (loc, type, CPTK_IS_NOTHROW_DESTRUCTIBLE); } /* Process std::meta::is_nothrow_relocatable_type. */ static tree -eval_is_nothrow_relocatable_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_nothrow_relocatable_type (location_t loc, tree type) { - return eval_type_trait (loc, ctx, type, CPTK_IS_NOTHROW_RELOCATABLE, - jump_target); + return eval_type_trait (loc, type, CPTK_IS_NOTHROW_RELOCATABLE); } /* Process std::meta::has_virtual_destructor. */ static tree -eval_has_virtual_destructor (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_has_virtual_destructor (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (type_has_virtual_destructor (type)) return boolean_true_node; else @@ -4463,12 +4281,8 @@ eval_has_virtual_destructor (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::has_unique_object_representations. */ static tree -eval_has_unique_object_representations (location_t loc, - const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_has_unique_object_representations (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (type_has_unique_obj_representations (type)) return boolean_true_node; else @@ -4478,33 +4292,26 @@ eval_has_unique_object_representations (location_t loc, /* Process std::meta::reference_constructs_from_temporary. */ static tree -eval_reference_constructs_from_temporary (location_t loc, - const constexpr_ctx *ctx, tree type1, - tree type2, tree *jump_target) +eval_reference_constructs_from_temporary (location_t loc, tree type1, + tree type2) { - return eval_type_trait (loc, ctx, type1, type2, - CPTK_REF_CONSTRUCTS_FROM_TEMPORARY, jump_target); + return eval_type_trait (loc, type1, type2, + CPTK_REF_CONSTRUCTS_FROM_TEMPORARY); } /* Process std::meta::reference_converts_from_temporary. */ static tree -eval_reference_converts_from_temporary (location_t loc, - const constexpr_ctx *ctx, tree type1, - tree type2, tree *jump_target) +eval_reference_converts_from_temporary (location_t loc, tree type1, tree type2) { - return eval_type_trait (loc, ctx, type1, type2, - CPTK_REF_CONVERTS_FROM_TEMPORARY, jump_target); + return eval_type_trait (loc, type1, type2, CPTK_REF_CONVERTS_FROM_TEMPORARY); } /* Process std::meta::rank. */ static tree -eval_rank (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_rank (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); size_t rank = 0; for (; TREE_CODE (type) == ARRAY_TYPE; type = TREE_TYPE (type)) ++rank; @@ -4514,11 +4321,8 @@ eval_rank (location_t loc, const constexpr_ctx *ctx, tree type, /* Process std::meta::extent. */ static tree -eval_extent (location_t loc, const constexpr_ctx *ctx, tree type, - tree i, tree *jump_target) +eval_extent (location_t loc, tree type, tree i) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); size_t rank = tree_to_uhwi (i); while (rank && TREE_CODE (type) == ARRAY_TYPE) { @@ -4527,8 +4331,7 @@ eval_extent (location_t loc, const constexpr_ctx *ctx, tree type, } if (rank || TREE_CODE (type) != ARRAY_TYPE - || eval_is_bounded_array_type (loc, ctx, type, - jump_target) == boolean_false_node) + || eval_is_bounded_array_type (loc, type) == boolean_false_node) return size_zero_node; return size_binop (PLUS_EXPR, TYPE_MAX_VALUE (TYPE_DOMAIN (type)), size_one_node); @@ -4537,83 +4340,67 @@ eval_extent (location_t loc, const constexpr_ctx *ctx, tree type, /* Process std::meta::is_same_type. */ static tree -eval_is_same_type (location_t loc, const constexpr_ctx *ctx, tree type1, - tree type2, tree *jump_target) +eval_is_same_type (location_t loc, tree type1, tree type2) { - return eval_type_trait (loc, ctx, type1, type2, CPTK_IS_SAME, jump_target); + return eval_type_trait (loc, type1, type2, CPTK_IS_SAME); } /* Process std::meta::is_base_of_type. */ static tree -eval_is_base_of_type (location_t loc, const constexpr_ctx *ctx, tree type1, - tree type2, tree *jump_target) +eval_is_base_of_type (location_t loc, tree type1, tree type2) { - return eval_type_trait (loc, ctx, type1, type2, CPTK_IS_BASE_OF, jump_target); + return eval_type_trait (loc, type1, type2, CPTK_IS_BASE_OF); } /* Process std::meta::is_virtual_base_of_type. */ static tree -eval_is_virtual_base_of_type (location_t loc, const constexpr_ctx *ctx, - tree type1, tree type2, tree *jump_target) +eval_is_virtual_base_of_type (location_t loc, tree type1, tree type2) { - return eval_type_trait (loc, ctx, type1, type2, CPTK_IS_VIRTUAL_BASE_OF, - jump_target); + return eval_type_trait (loc, type1, type2, CPTK_IS_VIRTUAL_BASE_OF); } /* Process std::meta::is_convertible_type. */ static tree -eval_is_convertible_type (location_t loc, const constexpr_ctx *ctx, - tree type1, tree type2, tree *jump_target) +eval_is_convertible_type (location_t loc, tree type1, tree type2) { - return eval_type_trait (loc, ctx, type1, type2, CPTK_IS_CONVERTIBLE, - jump_target); + return eval_type_trait (loc, type1, type2, CPTK_IS_CONVERTIBLE); } /* Process std::meta::is_nothrow_convertible_type. */ static tree -eval_is_nothrow_convertible_type (location_t loc, const constexpr_ctx *ctx, - tree type1, tree type2, tree *jump_target) +eval_is_nothrow_convertible_type (location_t loc, tree type1, tree type2) { - return eval_type_trait (loc, ctx, type1, type2, CPTK_IS_NOTHROW_CONVERTIBLE, - jump_target); + return eval_type_trait (loc, type1, type2, CPTK_IS_NOTHROW_CONVERTIBLE); } /* Process std::meta::is_layout_compatible_type. */ static tree -eval_is_layout_compatible_type (location_t loc, const constexpr_ctx *ctx, - tree type1, tree type2, tree *jump_target) +eval_is_layout_compatible_type (location_t loc, tree type1, tree type2) { - return eval_type_trait (loc, ctx, type1, type2, CPTK_IS_LAYOUT_COMPATIBLE, - jump_target); + return eval_type_trait (loc, type1, type2, CPTK_IS_LAYOUT_COMPATIBLE); } /* Process std::meta::is_pointer_interconvertible_base_of_type. */ static tree eval_is_pointer_interconvertible_base_of_type (location_t loc, - const constexpr_ctx *ctx, - tree type1, tree type2, - tree *jump_target) + tree type1, tree type2) { - return eval_type_trait (loc, ctx, type1, type2, - CPTK_IS_POINTER_INTERCONVERTIBLE_BASE_OF, - jump_target); + return eval_type_trait (loc, type1, type2, + CPTK_IS_POINTER_INTERCONVERTIBLE_BASE_OF); } /* Process std::meta::is_invocable_type. */ static tree -eval_is_invocable_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree tvec, tree *jump_target) +eval_is_invocable_type (location_t loc, tree type, tree tvec) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); - tree r = finish_trait_expr (input_location, CPTK_IS_INVOCABLE, type, tvec); + tree r = finish_trait_expr (loc, CPTK_IS_INVOCABLE, type, tvec); STRIP_ANY_LOCATION_WRAPPER (r); return r; } @@ -4667,14 +4454,8 @@ finish_library_value_trait (location_t loc, const constexpr_ctx *ctx, static tree eval_is_invocable_r_type (location_t loc, const constexpr_ctx *ctx, tree tres, tree type, tree tvec, tree call, - bool *non_constant_p, tree *jump_target, - const char *name) + bool *non_constant_p, const char *name) { - if (eval_is_type (tres) != boolean_true_node) - return throw_exception_nontype (loc, ctx, tres, jump_target); - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); - /* Create std::is_invocable_r::value. */ tree args = make_tree_vec (TREE_VEC_LENGTH (tvec) + 2); TREE_VEC_ELT (args, 0) = tres; @@ -4688,13 +4469,9 @@ eval_is_invocable_r_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_nothrow_invocable_type. */ static tree -eval_is_nothrow_invocable_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree tvec, tree *jump_target) +eval_is_nothrow_invocable_type (location_t loc, tree type, tree tvec) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); - tree r = finish_trait_expr (input_location, CPTK_IS_NOTHROW_INVOCABLE, - type, tvec); + tree r = finish_trait_expr (loc, CPTK_IS_NOTHROW_INVOCABLE, type, tvec); STRIP_ANY_LOCATION_WRAPPER (r); return r; } @@ -4704,14 +4481,8 @@ eval_is_nothrow_invocable_type (location_t loc, const constexpr_ctx *ctx, static tree eval_is_swappable_with_type (location_t loc, const constexpr_ctx *ctx, tree type1, tree type2, tree call, - bool *non_constant_p, tree *jump_target, - const char *name) + bool *non_constant_p, const char *name) { - if (eval_is_type (type1) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type1, jump_target); - if (eval_is_type (type2) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type2, jump_target); - /* Create std::is_swappable_with::value. */ tree args = make_tree_vec (2); TREE_VEC_ELT (args, 0) = type1; @@ -4725,11 +4496,8 @@ eval_is_swappable_with_type (location_t loc, const constexpr_ctx *ctx, static tree eval_is_swappable_type (location_t loc, const constexpr_ctx *ctx, tree type, tree call, bool *non_constant_p, - tree *jump_target, const char *name) + const char *name) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); - /* Create std::is_swappable::value. */ tree args = make_tree_vec (1); TREE_VEC_ELT (args, 0) = type; @@ -4740,11 +4508,8 @@ eval_is_swappable_type (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::remove_cvref. */ static tree -eval_remove_cvref (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_remove_cvref (location_t loc, tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (TYPE_REF_P (type)) type = TREE_TYPE (type); type = finish_trait_type (CPTK_REMOVE_CV, type, NULL_TREE, tf_none); @@ -4755,11 +4520,8 @@ eval_remove_cvref (location_t loc, const constexpr_ctx *ctx, tree type, /* Process std::meta::decay. */ static tree -eval_decay (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_decay (location_t loc, tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); type = finish_trait_type (CPTK_DECAY, type, NULL_TREE, tf_none); type = strip_typedefs (type); return get_reflection_raw (loc, type); @@ -4807,8 +4569,6 @@ static tree eval_underlying_type (location_t loc, const constexpr_ctx *ctx, tree type, tree *jump_target) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); /* The standard doesn't say this, but I hope it will clarify it. */ if (TREE_CODE (type) != ENUMERAL_TYPE || !COMPLETE_TYPE_P (type)) return throw_exception (loc, ctx, N_("reflection does not represent " @@ -4823,12 +4583,8 @@ eval_underlying_type (location_t loc, const constexpr_ctx *ctx, tree type, static tree eval_invoke_result (location_t loc, const constexpr_ctx *ctx, tree type, - tree tvec, tree call, bool *non_constant_p, - tree *jump_target) + tree tvec, tree call, bool *non_constant_p) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); - tree args = make_tree_vec (TREE_VEC_LENGTH (tvec) + 1); TREE_VEC_ELT (args, 0) = type; for (int i = 0; i < TREE_VEC_LENGTH (tvec); ++i) @@ -4841,12 +4597,8 @@ eval_invoke_result (location_t loc, const constexpr_ctx *ctx, tree type, static tree eval_unwrap_reference (location_t loc, const constexpr_ctx *ctx, tree type, - tree call, bool *non_constant_p, tree *jump_target, - const char *name) + tree call, bool *non_constant_p, const char *name) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); - tree args = make_tree_vec (1); TREE_VEC_ELT (args, 0) = type; return finish_library_type_trait (loc, ctx, name, args, call, @@ -4856,13 +4608,8 @@ eval_unwrap_reference (location_t loc, const constexpr_ctx *ctx, tree type, /* Process std::meta::type_order. */ static tree -eval_type_order (location_t loc, const constexpr_ctx *ctx, tree type1, - tree type2, tree *jump_target) +eval_type_order (tree type1, tree type2) { - if (eval_is_type (type1) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type1, jump_target); - if (eval_is_type (type2) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type2, jump_target); return type_order_value (strip_typedefs (type1), strip_typedefs (type2)); } @@ -4898,11 +4645,8 @@ eval_enumerators_of (location_t loc, const constexpr_ctx *ctx, tree r, represented by type. */ static tree -eval_remove_const (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_remove_const (location_t loc, tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); return get_reflection_raw (loc, strip_typedefs (remove_const (type))); } @@ -4912,11 +4656,8 @@ eval_remove_const (location_t loc, const constexpr_ctx *ctx, tree type, represented by type. */ static tree -eval_remove_volatile (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_remove_volatile (location_t loc, tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); int quals = cp_type_quals (type); quals &= ~TYPE_QUAL_VOLATILE; type = cp_build_qualified_type (type, quals); @@ -4930,11 +4671,8 @@ eval_remove_volatile (location_t loc, const constexpr_ctx *ctx, tree type, represented by type. */ static tree -eval_remove_cv (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_remove_cv (location_t loc, tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); type = finish_trait_type (CPTK_REMOVE_CV, type, NULL_TREE, tf_none); type = strip_typedefs (type); return get_reflection_raw (loc, type); @@ -4946,11 +4684,8 @@ eval_remove_cv (location_t loc, const constexpr_ctx *ctx, tree type, represented by type. */ static tree -eval_add_const (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_add_const (location_t loc, tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (!TYPE_REF_P (type) && !FUNC_OR_METHOD_TYPE_P (type)) { int quals = cp_type_quals (type); @@ -4967,11 +4702,8 @@ eval_add_const (location_t loc, const constexpr_ctx *ctx, tree type, represented by type. */ static tree -eval_add_volatile (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_add_volatile (location_t loc, tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (!TYPE_REF_P (type) && !FUNC_OR_METHOD_TYPE_P (type)) { int quals = cp_type_quals (type); @@ -4988,11 +4720,8 @@ eval_add_volatile (location_t loc, const constexpr_ctx *ctx, tree type, represented by type. */ static tree -eval_add_cv (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_add_cv (location_t loc, tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (!TYPE_REF_P (type) && !FUNC_OR_METHOD_TYPE_P (type)) { int quals = cp_type_quals (type); @@ -5009,11 +4738,8 @@ eval_add_cv (location_t loc, const constexpr_ctx *ctx, tree type, represented by type. */ static tree -eval_remove_reference (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_remove_reference (location_t loc, tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (TYPE_REF_P (type)) type = TREE_TYPE (type); type = strip_typedefs (type); @@ -5026,11 +4752,8 @@ eval_remove_reference (location_t loc, const constexpr_ctx *ctx, tree type, represented by type. */ static tree -eval_add_lvalue_reference (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_add_lvalue_reference (location_t loc, tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); type = finish_trait_type (CPTK_ADD_LVALUE_REFERENCE, type, NULL_TREE, tf_none); type = strip_typedefs (type); return get_reflection_raw (loc, type); @@ -5042,11 +4765,8 @@ eval_add_lvalue_reference (location_t loc, const constexpr_ctx *ctx, tree type, represented by type. */ static tree -eval_add_rvalue_reference (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_add_rvalue_reference (location_t loc, tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); type = finish_trait_type (CPTK_ADD_RVALUE_REFERENCE, type, NULL_TREE, tf_none); type = strip_typedefs (type); return get_reflection_raw (loc, type); @@ -5061,8 +4781,6 @@ static tree eval_make_signed (location_t loc, const constexpr_ctx *ctx, tree type, bool unsignedp, tree *jump_target) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); // TODO: I don't see the standard specifying what to do here. if (!INTEGRAL_TYPE_P (type) || TREE_CODE (type) == BOOLEAN_TYPE) return throw_exception (loc, ctx, N_("reflection represents non-integral " @@ -5112,11 +4830,8 @@ eval_make_signed (location_t loc, const constexpr_ctx *ctx, tree type, represented by type. */ static tree -eval_remove_extent (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_remove_extent (location_t loc, tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (TREE_CODE (type) == ARRAY_TYPE) type = TREE_TYPE (type); type = strip_typedefs (type); @@ -5129,11 +4844,8 @@ eval_remove_extent (location_t loc, const constexpr_ctx *ctx, tree type, represented by type. */ static tree -eval_remove_all_extents (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_remove_all_extents (location_t loc, tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); type = strip_array_types (type); type = strip_typedefs (type); return get_reflection_raw (loc, type); @@ -5145,11 +4857,8 @@ eval_remove_all_extents (location_t loc, const constexpr_ctx *ctx, tree type, represented by type. */ static tree -eval_remove_pointer (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_remove_pointer (location_t loc, tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (TYPE_PTR_P (type)) type = TREE_TYPE (type); type = strip_typedefs (type); @@ -5162,11 +4871,8 @@ eval_remove_pointer (location_t loc, const constexpr_ctx *ctx, tree type, represented by type. */ static tree -eval_add_pointer (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_add_pointer (location_t loc, tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); type = finish_trait_type (CPTK_ADD_POINTER, type, NULL_TREE, tf_none); type = strip_typedefs (type); return get_reflection_raw (loc, type); @@ -5326,11 +5032,8 @@ eval_substitute (location_t loc, const constexpr_ctx *ctx, dealias(type). */ static tree -eval_tuple_size (location_t loc, const constexpr_ctx *ctx, tree type, - tree *jump_target) +eval_tuple_size (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); type = strip_typedefs (type); /* It's UB to specialize tuple_size_v, so we can use this. */ return get_tuple_size (type); @@ -5342,12 +5045,9 @@ eval_tuple_size (location_t loc, const constexpr_ctx *ctx, tree type, and I is a constant equal to index. */ static tree -eval_tuple_element (location_t loc, const constexpr_ctx *ctx, tree i, - tree type, tree *jump_target) +eval_tuple_element (location_t loc, tree i, tree type) { const unsigned HOST_WIDE_INT index = tree_to_uhwi (i); - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); type = strip_typedefs (type); type = get_tuple_element_type (type, index); if (type == error_mark_node) @@ -5362,10 +5062,8 @@ eval_tuple_element (location_t loc, const constexpr_ctx *ctx, tree i, static tree eval_variant_size (location_t loc, const constexpr_ctx *ctx, tree type, - tree call, bool *non_constant_p, tree *jump_target) + tree call, bool *non_constant_p) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); type = strip_typedefs (type); /* Create std::variant_size::value. */ @@ -5381,11 +5079,8 @@ eval_variant_size (location_t loc, const constexpr_ctx *ctx, tree type, dealias(type) and I is a constant equal to index. */ static tree -eval_variant_alternative (location_t loc, const constexpr_ctx *ctx, tree i, - tree type, tree *jump_target) +eval_variant_alternative (location_t loc, tree i, tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); type = strip_typedefs (type); /* Create std::variant_alternative::type. */ tree args = make_tree_vec (2); @@ -5439,8 +5134,6 @@ eval_data_member_spec (location_t loc, const constexpr_ctx *ctx, bool *non_constant_p, bool *overflow_p, tree *jump_target) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); type = strip_typedefs (type); if (!TYPE_OBJ_P (type) && !TYPE_REF_P (type)) return throw_exception (loc, ctx, @@ -6014,11 +5707,8 @@ eval_reflect_constant_array (location_t loc, const constexpr_ctx *ctx, /* Process std::meta::is_implicit_lifetime_type. */ static tree -eval_is_implicit_lifetime_type (location_t loc, const constexpr_ctx *ctx, - tree type, tree *jump_target) +eval_is_implicit_lifetime_type (tree type) { - if (eval_is_type (type) != boolean_true_node) - return throw_exception_nontype (loc, ctx, type, jump_target); if (implicit_lifetime_type_p (type)) return boolean_true_node; else @@ -6828,10 +6518,11 @@ eval_has_inaccessible_subobjects (location_t loc, const constexpr_ctx *ctx, jump_target); } +#include "metafns.h" + /* Expand a call to a metafunction FUN. CALL is the CALL_EXPR. JUMP_TARGET is set if we are throwing std::meta::exception. */ -// TODO Use gperf? tree process_metafunction (const constexpr_ctx *ctx, tree fun, tree call, bool *non_constant_p, bool *overflow_p, @@ -6840,13 +6531,67 @@ process_metafunction (const constexpr_ctx *ctx, tree fun, tree call, tree name = DECL_NAME (fun); const char *ident = IDENTIFIER_POINTER (name); const location_t loc = cp_expr_loc_or_input_loc (call); - - if (id_equal (name, "reflect_constant") - || id_equal (name, "reflect_object") - || id_equal (name, "reflect_function")) + const metafn_info *minfo + = metafn_lookup::find (ident, IDENTIFIER_LENGTH (name)); + if (minfo == NULL) { - tree expr = get_nth_callarg (call, 0); - tree type = TREE_VEC_ELT (get_template_innermost_arguments (fun), 0); + not_found: + error_at (loc, "unknown metafunction %qD", fun); + *non_constant_p = true; + return call; + } + tree h = NULL_TREE, h1 = NULL_TREE, hvec = NULL_TREE, expr = NULL_TREE; + tree type = NULL_TREE, info; + reflect_kind kind = REFLECT_UNDEF; + switch ((minfo->kind >> 5) & 31) + { + case METAFN_KIND_ARG_VOID: + break; + case METAFN_KIND_ARG_INFO: + case METAFN_KIND_ARG_TINFO: + info = get_info (ctx, call, 0, non_constant_p, overflow_p, jump_target); + if (*jump_target) + return NULL_TREE; + if (*non_constant_p) + return call; + h = REFLECT_EXPR_HANDLE (info); + kind = static_cast(REFLECT_EXPR_KIND (info)); + if (((minfo->kind >> 5) & 31) == METAFN_KIND_ARG_TINFO) + { + if (eval_is_type (h) != boolean_true_node) + return throw_exception_nontype (loc, ctx, h, jump_target); + } + else + { + /* There still could be a TEMPLATE_ID_EXPR denoting a function + template. */ + h = resolve_nondeduced_context (h, tf_warning_or_error); + } + break; + case METAFN_KIND_ARG_REFLECTION_RANGE: + case METAFN_KIND_ARG_UNSIGNED: + case METAFN_KIND_ARG_ACCESS_CONTEXT: + case METAFN_KIND_ARG_DATA_MEMBER_OPTIONS: + default: + gcc_unreachable (); + case METAFN_KIND_ARG_REFLECTION_RANGET: + hvec = get_type_info_vec (loc, ctx, call, 0, non_constant_p, + overflow_p, jump_target); + if (*jump_target) + return NULL_TREE; + if (*non_constant_p) + return call; + break; + case METAFN_KIND_ARG_INPUT_RANGE: + /* Handled in eval_reflect_constant_*. */ + break; + case METAFN_KIND_ARG_TEMPLATE_PARM: + case METAFN_KIND_ARG_TEMPLATE_PARM_REF: + type = TREE_VEC_ELT (get_template_innermost_arguments (fun), 0); + /* FALLTHRU */ + case METAFN_KIND_ARG_SIZE_T: + case METAFN_KIND_ARG_OPERATORS: + expr = get_nth_callarg (call, 0); expr = cxx_eval_constant_expression (ctx, expr, vc_prvalue, non_constant_p, overflow_p, jump_target); @@ -6854,884 +6599,611 @@ process_metafunction (const constexpr_ctx *ctx, tree fun, tree call, return NULL_TREE; if (*non_constant_p) return call; - if (id_equal (name, "reflect_constant")) - return eval_reflect_constant (loc, ctx, type, expr, jump_target); - else if (id_equal (name, "reflect_object")) - return eval_reflect_object (loc, ctx, type, expr, jump_target); - else - return eval_reflect_function (loc, ctx, type, expr, jump_target); + break; } - if (id_equal (name, "symbol_of") || id_equal (name, "u8symbol_of")) + switch ((minfo->kind >> 10) & 31) { - tree expr = get_nth_callarg (call, 0); + case METAFN_KIND_ARG_VOID: + break; + case METAFN_KIND_ARG_INFO: + case METAFN_KIND_ARG_TINFO: + info = get_info (ctx, call, 1, non_constant_p, overflow_p, jump_target); + if (*jump_target) + return NULL_TREE; + if (*non_constant_p) + return call; + h1 = REFLECT_EXPR_HANDLE (info); + if (((minfo->kind >> 10) & 31) == METAFN_KIND_ARG_TINFO) + { + if (eval_is_type (h1) != boolean_true_node) + return throw_exception_nontype (loc, ctx, h1, jump_target); + } + break; + case METAFN_KIND_ARG_SIZE_T: + case METAFN_KIND_ARG_OPERATORS: + case METAFN_KIND_ARG_INPUT_RANGE: + case METAFN_KIND_ARG_TEMPLATE_PARM: + case METAFN_KIND_ARG_TEMPLATE_PARM_REF: + default: + gcc_unreachable (); + case METAFN_KIND_ARG_REFLECTION_RANGE: + hvec = get_info_vec (loc, ctx, call, 1, non_constant_p, overflow_p, + jump_target); + if (*jump_target) + return NULL_TREE; + if (*non_constant_p) + return call; + break; + case METAFN_KIND_ARG_REFLECTION_RANGET: + hvec = get_type_info_vec (loc, ctx, call, 1, non_constant_p, + overflow_p, jump_target); + if (*jump_target) + return NULL_TREE; + if (*non_constant_p) + return call; + break; + case METAFN_KIND_ARG_UNSIGNED: + case METAFN_KIND_ARG_ACCESS_CONTEXT: + case METAFN_KIND_ARG_DATA_MEMBER_OPTIONS: + expr = get_nth_callarg (call, 1); expr = cxx_eval_constant_expression (ctx, expr, vc_prvalue, non_constant_p, overflow_p, jump_target); if (*jump_target) return NULL_TREE; - return eval_symbol_of (loc, ctx, expr, jump_target, - id_equal (name, "symbol_of") ? char_type_node - : char8_type_node, TREE_TYPE (call)); + if (*non_constant_p) + return call; + break; } - if (id_equal (name, "tuple_element") - || id_equal (name, "variant_alternative")) + switch ((minfo->kind >> 15) & 31) { - tree i = get_nth_callarg (call, 0); - i = cxx_eval_constant_expression (ctx, i, vc_prvalue, - non_constant_p, overflow_p, - jump_target); + case METAFN_KIND_ARG_VOID: + break; + default: + gcc_unreachable (); + case METAFN_KIND_ARG_REFLECTION_RANGET: + hvec = get_type_info_vec (loc, ctx, call, 2, non_constant_p, + overflow_p, jump_target); if (*jump_target) return NULL_TREE; if (*non_constant_p) return call; - tree type = get_info (ctx, call, 1, non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - type = REFLECT_EXPR_HANDLE (type); - if (id_equal (name, "tuple_element")) - type = eval_tuple_element (loc, ctx, i, type, jump_target); - else - type = eval_variant_alternative (loc, ctx, i, type, jump_target); - if (type == error_mark_node) - { - *non_constant_p = true; - return call; - } - return type; - } - if (id_equal (name, "common_type") || id_equal (name, "common_reference")) - { - tree hvec = get_type_info_vec (loc, ctx, call, 0, non_constant_p, - overflow_p, jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - return eval_common_type (loc, ctx, hvec, call, non_constant_p, ident); - } - if (id_equal (name, "reflect_constant_string")) - return eval_reflect_constant_string (loc, ctx, call, non_constant_p, - overflow_p, jump_target); - if (id_equal (name, "reflect_constant_array")) - return eval_reflect_constant_array (loc, ctx, call, non_constant_p, - overflow_p, jump_target); - if (id_equal (name, "current") - && DECL_CLASS_SCOPE_P (fun) - && TYPE_NAME (DECL_CONTEXT (fun)) - && TREE_CODE (TYPE_NAME (DECL_CONTEXT (fun))) == TYPE_DECL - && DECL_NAME (TYPE_NAME (DECL_CONTEXT (fun))) - && id_equal (DECL_NAME (TYPE_NAME (DECL_CONTEXT (fun))), - "access_context")) - return eval_access_context_current (loc, ctx, call, non_constant_p); - - tree info = get_info (ctx, call, 0, non_constant_p, overflow_p, jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - tree h = REFLECT_EXPR_HANDLE (info); - auto kind = static_cast(REFLECT_EXPR_KIND (info)); - - /* There still could be a TEMPLATE_ID_EXPR denoting a function template. */ - h = resolve_nondeduced_context (h, tf_warning_or_error); - - /* Handle is_*. */ - if (startswith (ident, "is_")) - { - ident += 3; - if (!strcmp (ident, "variable")) - return eval_is_variable (h, kind); - if (!strcmp (ident, "type")) - return eval_is_type (h); - if (!strcmp (ident, "type_alias")) - return eval_is_type_alias (h); - if (!strcmp (ident, "namespace")) - return eval_is_namespace (h); - if (!strcmp (ident, "namespace_alias")) - return eval_is_namespace_alias (h); - if (!strcmp (ident, "function")) - return eval_is_function (h); - if (!strcmp (ident, "function_template")) - return eval_is_function_template (h); - if (!strcmp (ident, "variable_template")) - return eval_is_variable_template (h); - if (!strcmp (ident, "class_template")) - return eval_is_class_template (h); - if (!strcmp (ident, "alias_template")) - return eval_is_alias_template (h); - if (!strcmp (ident, "concept")) - return eval_is_concept (h); - if (!strcmp (ident, "object")) - return eval_is_object (kind); - if (!strcmp (ident, "value")) - return eval_is_value (kind); - if (!strcmp (ident, "structured_binding")) - return eval_is_structured_binding (h); - if (!strcmp (ident, "class_member")) - return eval_is_class_member (h); - if (!strcmp (ident, "namespace_member")) - return eval_is_namespace_member (h); - if (!strcmp (ident, "nonstatic_data_member")) - return eval_is_nonstatic_data_member (h); - if (!strcmp (ident, "static_member")) - return eval_is_static_member (h); - if (!strcmp (ident, "base")) - return eval_is_base (h, kind); - if (!strcmp (ident, "mutable_member")) - return eval_is_mutable_member (h); - if (!strcmp (ident, "template")) - return eval_is_template (h); - if (!strcmp (ident, "function_parameter")) - return eval_is_function_parameter (h, kind); - if (!strcmp (ident, "explicit_object_parameter")) - return eval_is_explicit_object_parameter (h, kind); - if (!strcmp (ident, "deleted")) - return eval_is_deleted (h); - if (!strcmp (ident, "defaulted")) - return eval_is_defaulted (h); - if (!strcmp (ident, "user_provided")) - return eval_is_user_provided (h); - if (!strcmp (ident, "user_declared")) - return eval_is_user_declared (h); - if (!strcmp (ident, "explicit")) - return eval_is_explicit (h); - if (!strcmp (ident, "bit_field")) - return eval_is_bit_field (h, kind); - if (!strcmp (ident, "enumerator")) - return eval_is_enumerator (h); - if (!strcmp (ident, "complete_type")) - return eval_is_complete_type (h); - if (!strcmp (ident, "enumerable_type")) - return eval_is_enumerable_type (h); - if (!strcmp (ident, "annotation")) - return eval_is_annotation (h); - if (!strcmp (ident, "noexcept")) - return eval_is_noexcept (loc, ctx, h, jump_target); - if (!strcmp (ident, "const")) - return eval_is_const (h, kind); - if (!strcmp (ident, "volatile")) - return eval_is_volatile (h, kind); - if (!strcmp (ident, "conversion_function")) - return eval_is_conversion_function (h); - if (!strcmp (ident, "operator_function")) - return eval_is_operator_function (h); - if (!strcmp (ident, "literal_operator")) - return eval_is_literal_operator (h); - if (!strcmp (ident, "special_member_function")) - return eval_is_special_member_function (h); - if (!strcmp (ident, "constructor")) - return eval_is_constructor (h); - if (!strcmp (ident, "default_constructor")) - return eval_is_default_constructor (h); - if (!strcmp (ident, "copy_constructor")) - return eval_is_copy_constructor (h); - if (!strcmp (ident, "move_constructor")) - return eval_is_move_constructor (h); - if (!strcmp (ident, "assignment")) - return eval_is_assignment (h); - if (!strcmp (ident, "copy_assignment")) - return eval_is_copy_assignment (h); - if (!strcmp (ident, "move_assignment")) - return eval_is_move_assignment (h); - if (!strcmp (ident, "destructor")) - return eval_is_destructor (h); - if (!strcmp (ident, "conversion_function_template")) - return eval_is_conversion_function_template (h); - if (!strcmp (ident, "operator_function_template")) - return eval_is_operator_function_template (h); - if (!strcmp (ident, "literal_operator_template")) - return eval_is_literal_operator_template (h); - if (!strcmp (ident, "constructor_template")) - return eval_is_constructor_template (h); - if (!strcmp (ident, "function_type")) - return eval_is_function_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "void_type")) - return eval_is_void_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "null_pointer_type")) - return eval_is_null_pointer_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "integral_type")) - return eval_is_integral_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "floating_point_type")) - return eval_is_floating_point_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "array_type")) - return eval_is_array_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "pointer_type")) - return eval_is_pointer_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "lvalue_reference_type")) - return eval_is_lvalue_reference_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "rvalue_reference_type")) - return eval_is_rvalue_reference_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "member_object_pointer_type")) - return eval_is_member_object_pointer_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "member_function_pointer_type")) - return eval_is_member_function_pointer_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "enum_type")) - return eval_is_enum_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "union_type")) - return eval_is_union_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "class_type")) - return eval_is_class_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "reflection_type")) - return eval_is_reflection_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "reference_type")) - return eval_is_reference_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "arithmetic_type")) - return eval_is_arithmetic_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "object_type")) - return eval_is_object_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "scalar_type")) - return eval_is_scalar_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "member_pointer_type")) - return eval_is_member_pointer_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "const_type")) - return eval_is_const_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "volatile_type")) - return eval_is_volatile_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "trivially_copyable_type")) - return eval_is_trivially_copyable_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "trivially_relocatable_type")) - return eval_is_trivially_relocatable_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "replaceable_type")) - return eval_is_replaceable_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "standard_layout_type")) - return eval_is_standard_layout_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "empty_type")) - return eval_is_empty_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "polymorphic_type")) - return eval_is_polymorphic_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "abstract_type")) - return eval_is_abstract_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "final_type")) - return eval_is_final_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "aggregate_type")) - return eval_is_aggregate_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "consteval_only_type")) - return eval_is_consteval_only_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "signed_type")) - return eval_is_signed_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "unsigned_type")) - return eval_is_unsigned_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "bounded_array_type")) - return eval_is_bounded_array_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "unbounded_array_type")) - return eval_is_unbounded_array_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "scoped_enum_type")) - return eval_is_scoped_enum_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "constructible_type")) - { - tree hvec = get_type_info_vec (loc, ctx, call, 1, non_constant_p, - overflow_p, jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - return eval_is_constructible_type (loc, ctx, h, hvec, jump_target); - } - if (!strcmp (ident, "default_constructible_type")) - return eval_is_default_constructible_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "copy_constructible_type")) - return eval_is_copy_constructible_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "move_constructible_type")) - return eval_is_move_constructible_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "copy_assignable_type")) - return eval_is_copy_assignable_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "move_assignable_type")) - return eval_is_move_assignable_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "destructible_type")) - return eval_is_destructible_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "trivially_constructible_type")) - { - tree hvec = get_type_info_vec (loc, ctx, call, 1, non_constant_p, - overflow_p, jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - return eval_is_trivially_constructible_type (loc, ctx, h, hvec, - jump_target); - } - if (!strcmp (ident, "trivially_default_constructible_type")) - return eval_is_trivially_default_constructible_type (loc, ctx, h, - jump_target); - if (!strcmp (ident, "trivially_copy_constructible_type")) - return eval_is_trivially_copy_constructible_type (loc, ctx, h, - jump_target); - if (!strcmp (ident, "trivially_move_constructible_type")) - return eval_is_trivially_move_constructible_type (loc, ctx, h, - jump_target); - if (!strcmp (ident, "trivially_copy_assignable_type")) - return eval_is_trivially_copy_assignable_type (loc, ctx, h, - jump_target); - if (!strcmp (ident, "trivially_move_assignable_type")) - return eval_is_trivially_move_assignable_type (loc, ctx, h, - jump_target); - if (!strcmp (ident, "trivially_destructible_type")) - return eval_is_trivially_destructible_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "nothrow_constructible_type")) - { - tree hvec = get_type_info_vec (loc, ctx, call, 1, non_constant_p, - overflow_p, jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - return eval_is_nothrow_constructible_type (loc, ctx, h, hvec, - jump_target); - } - if (!strcmp (ident, "nothrow_default_constructible_type")) - return eval_is_nothrow_default_constructible_type (loc, ctx, h, - jump_target); - if (!strcmp (ident, "nothrow_copy_constructible_type")) - return eval_is_nothrow_copy_constructible_type (loc, ctx, h, - jump_target); - if (!strcmp (ident, "nothrow_move_constructible_type")) - return eval_is_nothrow_move_constructible_type (loc, ctx, h, - jump_target); - if (!strcmp (ident, "nothrow_copy_assignable_type")) - return eval_is_nothrow_copy_assignable_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "nothrow_move_assignable_type")) - return eval_is_nothrow_move_assignable_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "nothrow_destructible_type")) - return eval_is_nothrow_destructible_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "nothrow_relocatable_type")) - return eval_is_nothrow_relocatable_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "fundamental_type")) - return eval_is_fundamental_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "compound_type")) - return eval_is_compound_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "same_type")) - { - tree i1 = get_info (ctx, call, 1, non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - tree h1 = REFLECT_EXPR_HANDLE (i1); - return eval_is_same_type (loc, ctx, h, h1, jump_target); - } - if (!strcmp (ident, "base_of_type")) - { - tree i1 = get_info (ctx, call, 1, non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - tree h1 = REFLECT_EXPR_HANDLE (i1); - return eval_is_base_of_type (loc, ctx, h, h1, jump_target); - } - if (!strcmp (ident, "virtual_base_of_type")) - { - tree i1 = get_info (ctx, call, 1, non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - tree h1 = REFLECT_EXPR_HANDLE (i1); - return eval_is_virtual_base_of_type (loc, ctx, h, h1, jump_target); - } - if (!strcmp (ident, "convertible_type")) - { - tree i1 = get_info (ctx, call, 1, non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - tree h1 = REFLECT_EXPR_HANDLE (i1); - return eval_is_convertible_type (loc, ctx, h, h1, jump_target); - } - if (!strcmp (ident, "nothrow_convertible_type")) - { - tree i1 = get_info (ctx, call, 1, non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - tree h1 = REFLECT_EXPR_HANDLE (i1); - return eval_is_nothrow_convertible_type (loc, ctx, h, h1, - jump_target); - } - if (!strcmp (ident, "layout_compatible_type")) - { - tree i1 = get_info (ctx, call, 1, non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - tree h1 = REFLECT_EXPR_HANDLE (i1); - return eval_is_layout_compatible_type (loc, ctx, h, h1, jump_target); - } - if (!strcmp (ident, "pointer_interconvertible_base_of_type")) - { - tree i1 = get_info (ctx, call, 1, non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - tree h1 = REFLECT_EXPR_HANDLE (i1); - return eval_is_pointer_interconvertible_base_of_type (loc, ctx, h, - h1, - jump_target); - } - if (!strcmp (ident, "invocable_type")) - { - tree hvec = get_type_info_vec (loc, ctx, call, 1, non_constant_p, - overflow_p, jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - return eval_is_invocable_type (loc, ctx, h, hvec, jump_target); - } - if (!strcmp (ident, "nothrow_invocable_type")) - { - tree hvec = get_type_info_vec (loc, ctx, call, 1, non_constant_p, - overflow_p, jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - return eval_is_nothrow_invocable_type (loc, ctx, h, hvec, - jump_target); - } - if (!strcmp (ident, "invocable_r_type") - || !strcmp (ident, "nothrow_invocable_r_type")) - { - tree i1 = get_info (ctx, call, 1, non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - tree h1 = REFLECT_EXPR_HANDLE (i1); - tree hvec = get_type_info_vec (loc, ctx, call, 2, non_constant_p, - overflow_p, jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - return eval_is_invocable_r_type (loc, ctx, h, h1, hvec, call, - non_constant_p, jump_target, - ident[0] == 'n' - ? "is_nothrow_invocable_r" - : "is_invocable_r"); - } - if (!strcmp (ident, "assignable_type")) - { - tree i1 = get_info (ctx, call, 1, non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - tree h1 = REFLECT_EXPR_HANDLE (i1); - return eval_is_assignable_type (loc, ctx, h, h1, jump_target); - } - if (!strcmp (ident, "trivially_assignable_type")) - { - tree i1 = get_info (ctx, call, 1, non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - tree h1 = REFLECT_EXPR_HANDLE (i1); - return eval_is_trivially_assignable_type (loc, ctx, h, h1, - jump_target); - } - if (!strcmp (ident, "nothrow_assignable_type")) - { - tree i1 = get_info (ctx, call, 1, non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - tree h1 = REFLECT_EXPR_HANDLE (i1); - return eval_is_nothrow_assignable_type (loc, ctx, h, h1, - jump_target); - } - if (!strcmp (ident, "swappable_with_type")) - { - tree i1 = get_info (ctx, call, 1, non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - tree h1 = REFLECT_EXPR_HANDLE (i1); - return eval_is_swappable_with_type (loc, ctx, h, h1, call, - non_constant_p, jump_target, - "is_swappable_with"); - } - if (!strcmp (ident, "swappable_type")) - return eval_is_swappable_type (loc, ctx, h, call, non_constant_p, - jump_target, "is_swappable"); - if (!strcmp (ident, "nothrow_swappable_with_type")) - { - tree i1 = get_info (ctx, call, 1, non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - tree h1 = REFLECT_EXPR_HANDLE (i1); - return eval_is_swappable_with_type (loc, ctx, h, h1, call, - non_constant_p, jump_target, - "is_nothrow_swappable_with"); - } - if (!strcmp (ident, "nothrow_swappable_type")) - return eval_is_swappable_type (loc, ctx, h, call, non_constant_p, - jump_target, "is_nothrow_swappable"); - if (!strcmp (ident, "data_member_spec")) - return eval_is_data_member_spec (h, kind); - if (!strcmp (ident, "lvalue_reference_qualified")) - return eval_is_lrvalue_reference_qualified (h, kind, - /*rvalue_p=*/false); - if (!strcmp (ident, "rvalue_reference_qualified")) - return eval_is_lrvalue_reference_qualified (h, kind, - /*rvalue_p=*/true); - if (!strcmp (ident, "implicit_lifetime_type")) - return eval_is_implicit_lifetime_type (loc, ctx, h, jump_target); - if (!strcmp (ident, "accessible")) - { - tree actx = get_nth_callarg (call, 1); - actx = cxx_eval_constant_expression (ctx, actx, vc_prvalue, - non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - return eval_is_accessible (loc, ctx, h, kind, actx, call, - non_constant_p, jump_target); - } - goto not_found; + break; } - /* Handle has_*. */ - if (startswith (ident, "has_")) + switch (minfo->code) { - ident += 4; - if (!strcmp (ident, "identifier")) - return eval_has_identifier (h, kind); - if (!strcmp (ident, "internal_linkage")) - return eval_has_internal_linkage (h, kind); - if (!strcmp (ident, "module_linkage")) - return eval_has_module_linkage (h, kind); - if (!strcmp (ident, "external_linkage")) - return eval_has_external_linkage (h, kind); - if (!strcmp (ident, "c_language_linkage")) - return eval_has_c_language_linkage (h, kind); - if (!strcmp (ident, "linkage")) - return eval_has_linkage (h, kind); - if (!strcmp (ident, "template_arguments")) - return eval_has_template_arguments (h); - if (!strcmp (ident, "parent")) - return eval_has_parent (h, kind); - if (!strcmp (ident, "default_argument")) - return eval_has_default_argument (h, kind); - if (!strcmp (ident, "ellipsis_parameter")) - return eval_has_ellipsis_parameter (h); - if (!strcmp (ident, "virtual_destructor")) - return eval_has_virtual_destructor (loc, ctx, h, jump_target); - if (!strcmp (ident, "unique_object_representations")) - return eval_has_unique_object_representations (loc, ctx, h, - jump_target); - if (!strcmp (ident, "default_member_initializer")) - return eval_has_default_member_initializer (h); - if (!strcmp (ident, "static_storage_duration")) - return eval_has_static_storage_duration (h, kind); - if (!strcmp (ident, "thread_storage_duration")) - return eval_has_thread_storage_duration (h, kind); - if (!strcmp (ident, "automatic_storage_duration")) - return eval_has_automatic_storage_duration (h, kind); - if (!strcmp (ident, "inaccessible_nonstatic_data_members") - || !strcmp (ident, "inaccessible_bases") - || !strcmp (ident, "inaccessible_subobjects")) - { - tree actx = get_nth_callarg (call, 1); - actx = cxx_eval_constant_expression (ctx, actx, vc_prvalue, - non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - if (!strcmp (ident, "inaccessible_bases")) - return eval_has_inaccessible_bases (loc, ctx, h, actx, call, - non_constant_p, jump_target); - if (!strcmp (ident, "inaccessible_subobjects")) - return eval_has_inaccessible_subobjects (loc, ctx, h, actx, call, - non_constant_p, - jump_target); - return eval_has_inaccessible_nonstatic_data_members (loc, ctx, h, - actx, call, - non_constant_p, - jump_target); - } - goto not_found; - } - - if (id_equal (name, "source_location_of")) - return eval_source_location_of (loc, h, TREE_TYPE (call)); - if (id_equal (name, "dealias")) - return eval_dealias (loc, ctx, h, jump_target); - if (id_equal (name, "template_of")) - return eval_template_of (loc, ctx, h, jump_target); - if (id_equal (name, "template_arguments_of")) - return eval_template_arguments_of (loc, ctx, h, jump_target); - if (id_equal (name, "parameters_of")) - return eval_parameters_of (loc, ctx, h, jump_target); - if (id_equal (name, "enumerators_of")) - return eval_enumerators_of (loc, ctx, h, jump_target); - if (id_equal (name, "variable_of")) - return eval_variable_of (loc, ctx, h, kind, jump_target); - if (id_equal (name, "return_type_of")) - return eval_return_type_of (loc, ctx, h, kind, jump_target); - if (id_equal (name, "offset_of")) - return eval_offset_of (loc, ctx, h, kind, TREE_TYPE (call), jump_target); - if (id_equal (name, "size_of")) - return eval_size_of (loc, ctx, h, kind, TREE_TYPE (call), jump_target); - if (id_equal (name, "bit_size_of")) - return eval_bit_size_of (loc, ctx, h, kind, TREE_TYPE (call), jump_target); - if (id_equal (name, "remove_const")) - return eval_remove_const (loc, ctx, h, jump_target); - if (id_equal (name, "remove_volatile")) - return eval_remove_volatile (loc, ctx, h, jump_target); - if (id_equal (name, "remove_cv")) - return eval_remove_cv (loc, ctx, h, jump_target); - if (id_equal (name, "add_const")) - return eval_add_const (loc, ctx, h, jump_target); - if (id_equal (name, "add_volatile")) - return eval_add_volatile (loc, ctx, h, jump_target); - if (id_equal (name, "add_cv")) - return eval_add_cv (loc, ctx, h, jump_target); - if (id_equal (name, "remove_reference")) - return eval_remove_reference (loc, ctx, h, jump_target); - if (id_equal (name, "add_lvalue_reference")) - return eval_add_lvalue_reference (loc, ctx, h, jump_target); - if (id_equal (name, "add_rvalue_reference")) - return eval_add_rvalue_reference (loc, ctx, h, jump_target); - if (id_equal (name, "make_signed")) - return eval_make_signed (loc, ctx, h, false, jump_target); - if (id_equal (name, "make_unsigned")) - return eval_make_signed (loc, ctx, h, true, jump_target); - if (id_equal (name, "remove_extent")) - return eval_remove_extent (loc, ctx, h, jump_target); - if (id_equal (name, "remove_all_extents")) - return eval_remove_all_extents (loc, ctx, h, jump_target); - if (id_equal (name, "remove_pointer")) - return eval_remove_pointer (loc, ctx, h, jump_target); - if (id_equal (name, "add_pointer")) - return eval_add_pointer (loc, ctx, h, jump_target); - if (id_equal (name, "annotations_of")) - return eval_annotations_of (loc, ctx, h, kind, NULL_TREE, jump_target); - if (id_equal (name, "annotations_of_with_type")) - { - tree i1 = get_info (ctx, call, 1, non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - tree h1 = REFLECT_EXPR_HANDLE (i1); - return eval_annotations_of (loc, ctx, h, kind, h1, jump_target); - } - if (id_equal (name, "type_of")) - return eval_type_of (loc, ctx, h, kind, jump_target); - if (id_equal (name, "object_of")) - return eval_object_of (loc, ctx, h, kind, jump_target); - if (id_equal (name, "constant_of")) - return eval_constant_of (loc, ctx, h, jump_target); - if (!strcmp (ident, "operator_of")) - return eval_operator_of (loc, ctx, h, jump_target, TREE_TYPE (call)); - if (id_equal (name, "parent_of")) - return eval_parent_of (loc, ctx, h, kind, jump_target); - if (id_equal (name, "reference_constructs_from_temporary")) - { - tree i1 = get_info (ctx, call, 1, non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - tree h1 = REFLECT_EXPR_HANDLE (i1); - return eval_reference_constructs_from_temporary (loc, ctx, h, h1, - jump_target); - } - if (id_equal (name, "reference_converts_from_temporary")) - { - tree i1 = get_info (ctx, call, 1, non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - tree h1 = REFLECT_EXPR_HANDLE (i1); - return eval_reference_converts_from_temporary (loc, ctx, h, h1, - jump_target); - } - if (id_equal (name, "rank")) - return eval_rank (loc, ctx, h, jump_target); - if (id_equal (name, "extent")) - { - tree i = get_nth_callarg (call, 1); - i = cxx_eval_constant_expression (ctx, i, vc_prvalue, - non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - return eval_extent (loc, ctx, h, i, jump_target); - } - if (id_equal (name, "remove_cvref")) - return eval_remove_cvref (loc, ctx, h, jump_target); - if (id_equal (name, "decay")) - return eval_decay (loc, ctx, h, jump_target); - if (id_equal (name, "underlying_type")) - return eval_underlying_type (loc, ctx, h, jump_target); - if (id_equal (name, "type_order")) - { - tree i1 = get_info (ctx, call, 1, non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - tree h1 = REFLECT_EXPR_HANDLE (i1); - return eval_type_order (loc, ctx, h, h1, jump_target); - } - if (id_equal (name, "identifier_of")) - return eval_identifier_of (loc, ctx, h, kind, jump_target, char_type_node, - TREE_TYPE (call)); - if (id_equal (name, "u8identifier_of")) - return eval_identifier_of (loc, ctx, h, kind, jump_target, - char8_type_node, TREE_TYPE (call)); - if (id_equal (name, "display_string_of")) - return eval_display_string_of (loc, ctx, h, kind, jump_target, - char_type_node, TREE_TYPE (call)); - if (id_equal (name, "u8display_string_of")) - return eval_display_string_of (loc, ctx, h, kind, jump_target, - char8_type_node, TREE_TYPE (call)); - if (id_equal (name, "tuple_size")) - { - tree tsize = eval_tuple_size (loc, ctx, h, jump_target); - if (*jump_target) - return NULL_TREE; - if (!tsize || tsize == error_mark_node) - { - if (!cxx_constexpr_quiet_p (ctx)) - error_at (loc, "couldn%'t compute %qs of %qT", "tuple_size", h); - *non_constant_p = true; - return call; - } - return tsize; - } - if (id_equal (name, "variant_size")) - return eval_variant_size (loc, ctx, h, call, non_constant_p, jump_target); - if (id_equal (name, "invoke_result")) - { - tree hvec = get_type_info_vec (loc, ctx, call, 1, non_constant_p, - overflow_p, jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - return eval_invoke_result (loc, ctx, h, hvec, call, + case METAFN_OPERATOR_OF: + return eval_operator_of (loc, ctx, h, jump_target, TREE_TYPE (call)); + case METAFN_SYMBOL_OF: + return eval_symbol_of (loc, ctx, expr, jump_target, char_type_node, + TREE_TYPE (call)); + case METAFN_U8SYMBOL_OF: + return eval_symbol_of (loc, ctx, expr, jump_target, char8_type_node, + TREE_TYPE (call)); + case METAFN_HAS_IDENTIFIER: + return eval_has_identifier (h, kind); + case METAFN_IDENTIFIER_OF: + return eval_identifier_of (loc, ctx, h, kind, jump_target, char_type_node, + TREE_TYPE (call)); + case METAFN_U8IDENTIFIER_OF: + return eval_identifier_of (loc, ctx, h, kind, jump_target, char8_type_node, + TREE_TYPE (call)); + case METAFN_DISPLAY_STRING_OF: + return eval_display_string_of (loc, ctx, h, kind, jump_target, + char_type_node, TREE_TYPE (call)); + case METAFN_U8DISPLAY_STRING_OF: + return eval_display_string_of (loc, ctx, h, kind, jump_target, + char8_type_node, TREE_TYPE (call)); + case METAFN_SOURCE_LOCATION_OF: + return eval_source_location_of (loc, h, TREE_TYPE (call)); + case METAFN_TYPE_OF: + return eval_type_of (loc, ctx, h, kind, jump_target); + case METAFN_OBJECT_OF: + return eval_object_of (loc, ctx, h, kind, jump_target); + case METAFN_CONSTANT_OF: + return eval_constant_of (loc, ctx, h, jump_target); + case METAFN_IS_PUBLIC: + case METAFN_IS_PROTECTED: + case METAFN_IS_PRIVATE: + case METAFN_IS_VIRTUAL: + case METAFN_IS_PURE_VIRTUAL: + case METAFN_IS_OVERRIDE: + case METAFN_IS_FINAL: + gcc_unreachable (); + case METAFN_IS_DELETED: + return eval_is_deleted (h); + case METAFN_IS_DEFAULTED: + return eval_is_defaulted (h); + case METAFN_IS_USER_PROVIDED: + return eval_is_user_provided (h); + case METAFN_IS_USER_DECLARED: + return eval_is_user_declared (h); + case METAFN_IS_EXPLICIT: + return eval_is_explicit (h); + case METAFN_IS_NOEXCEPT: + return eval_is_noexcept (h); + case METAFN_IS_BIT_FIELD: + return eval_is_bit_field (h, kind); + case METAFN_IS_ENUMERATOR: + return eval_is_enumerator (h); + case METAFN_IS_ANNOTATION: + return eval_is_annotation (h); + case METAFN_IS_CONST: + return eval_is_const (h, kind); + case METAFN_IS_VOLATILE: + return eval_is_volatile (h, kind); + case METAFN_IS_MUTABLE_MEMBER: + return eval_is_mutable_member (h); + case METAFN_IS_LVALUE_REFERENCE_QUALIFIED: + return eval_is_lrvalue_reference_qualified (h, kind, /*rvalue_p=*/false); + case METAFN_IS_RVALUE_REFERENCE_QUALIFIED: + return eval_is_lrvalue_reference_qualified (h, kind, /*rvalue_p=*/true); + case METAFN_HAS_STATIC_STORAGE_DURATION: + return eval_has_static_storage_duration (h, kind); + case METAFN_HAS_THREAD_STORAGE_DURATION: + return eval_has_thread_storage_duration (h, kind); + case METAFN_HAS_AUTOMATIC_STORAGE_DURATION: + return eval_has_automatic_storage_duration (h, kind); + case METAFN_HAS_INTERNAL_LINKAGE: + return eval_has_internal_linkage (h, kind); + case METAFN_HAS_MODULE_LINKAGE: + return eval_has_module_linkage (h, kind); + case METAFN_HAS_EXTERNAL_LINKAGE: + return eval_has_external_linkage (h, kind); + case METAFN_HAS_C_LANGUAGE_LINKAGE: + return eval_has_c_language_linkage (h, kind); + case METAFN_HAS_LINKAGE: + return eval_has_linkage (h, kind); + case METAFN_IS_COMPLETE_TYPE: + return eval_is_complete_type (h); + case METAFN_IS_ENUMERABLE_TYPE: + return eval_is_enumerable_type (h); + case METAFN_IS_VARIABLE: + return eval_is_variable (h, kind); + case METAFN_IS_TYPE: + return eval_is_type (h); + case METAFN_IS_NAMESPACE: + return eval_is_namespace (h); + case METAFN_IS_TYPE_ALIAS: + return eval_is_type_alias (h); + case METAFN_IS_NAMESPACE_ALIAS: + return eval_is_namespace_alias (h); + case METAFN_IS_FUNCTION: + return eval_is_function (h); + case METAFN_IS_CONVERSION_FUNCTION: + return eval_is_conversion_function (h); + case METAFN_IS_OPERATOR_FUNCTION: + return eval_is_operator_function (h); + case METAFN_IS_LITERAL_OPERATOR: + return eval_is_literal_operator (h); + case METAFN_IS_SPECIAL_MEMBER_FUNCTION: + return eval_is_special_member_function (h); + case METAFN_IS_CONSTRUCTOR: + return eval_is_constructor (h); + case METAFN_IS_DEFAULT_CONSTRUCTOR: + return eval_is_default_constructor (h); + case METAFN_IS_COPY_CONSTRUCTOR: + return eval_is_copy_constructor (h); + case METAFN_IS_MOVE_CONSTRUCTOR: + return eval_is_move_constructor (h); + case METAFN_IS_ASSIGNMENT: + return eval_is_assignment (h); + case METAFN_IS_COPY_ASSIGNMENT: + return eval_is_copy_assignment (h); + case METAFN_IS_MOVE_ASSIGNMENT: + return eval_is_move_assignment (h); + case METAFN_IS_DESTRUCTOR: + return eval_is_destructor (h); + case METAFN_IS_FUNCTION_PARAMETER: + return eval_is_function_parameter (h, kind); + case METAFN_IS_EXPLICIT_OBJECT_PARAMETER: + return eval_is_explicit_object_parameter (h, kind); + case METAFN_HAS_DEFAULT_ARGUMENT: + return eval_has_default_argument (h, kind); + case METAFN_HAS_ELLIPSIS_PARAMETER: + return eval_has_ellipsis_parameter (h); + case METAFN_IS_TEMPLATE: + return eval_is_template (h); + case METAFN_IS_FUNCTION_TEMPLATE: + return eval_is_function_template (h); + case METAFN_IS_VARIABLE_TEMPLATE: + return eval_is_variable_template (h); + case METAFN_IS_CLASS_TEMPLATE: + return eval_is_class_template (h); + case METAFN_IS_ALIAS_TEMPLATE: + return eval_is_alias_template (h); + case METAFN_IS_CONVERSION_FUNCTION_TEMPLATE: + return eval_is_conversion_function_template (h); + case METAFN_IS_OPERATOR_FUNCTION_TEMPLATE: + return eval_is_operator_function_template (h); + case METAFN_IS_LITERAL_OPERATOR_TEMPLATE: + return eval_is_literal_operator_template (h); + case METAFN_IS_CONSTRUCTOR_TEMPLATE: + return eval_is_constructor_template (h); + case METAFN_IS_CONCEPT: + return eval_is_concept (h); + case METAFN_IS_VALUE: + return eval_is_value (kind); + case METAFN_IS_OBJECT: + return eval_is_object (kind); + case METAFN_IS_STRUCTURED_BINDING: + return eval_is_structured_binding (h); + case METAFN_IS_CLASS_MEMBER: + return eval_is_class_member (h); + case METAFN_IS_NAMESPACE_MEMBER: + return eval_is_namespace_member (h); + case METAFN_IS_NONSTATIC_DATA_MEMBER: + return eval_is_nonstatic_data_member (h); + case METAFN_IS_STATIC_MEMBER: + return eval_is_static_member (h); + case METAFN_IS_BASE: + return eval_is_base (h, kind); + case METAFN_HAS_DEFAULT_MEMBER_INITIALIZER: + return eval_has_default_member_initializer (h); + case METAFN_HAS_PARENT: + return eval_has_parent (h, kind); + case METAFN_PARENT_OF: + return eval_parent_of (loc, ctx, h, kind, jump_target); + case METAFN_DEALIAS: + return eval_dealias (loc, ctx, h, jump_target); + case METAFN_HAS_TEMPLATE_ARGUMENTS: + return eval_has_template_arguments (h); + case METAFN_TEMPLATE_OF: + return eval_template_of (loc, ctx, h, jump_target); + case METAFN_TEMPLATE_ARGUMENTS_OF: + return eval_template_arguments_of (loc, ctx, h, jump_target); + case METAFN_PARAMETERS_OF: + return eval_parameters_of (loc, ctx, h, jump_target); + case METAFN_VARIABLE_OF: + return eval_variable_of (loc, ctx, h, kind, jump_target); + case METAFN_RETURN_TYPE_OF: + return eval_return_type_of (loc, ctx, h, kind, jump_target); + case METAFN_IS_ACCESSIBLE: + return eval_is_accessible (loc, ctx, h, kind, expr, call, non_constant_p, jump_target); - } - if (id_equal (name, "unwrap_reference") - || id_equal (name, "unwrap_ref_decay")) - return eval_unwrap_reference (loc, ctx, h, call, non_constant_p, - jump_target, ident); - if (id_equal (name, "can_substitute")) - { - tree hvec = get_info_vec (loc, ctx, call, 1, non_constant_p, - overflow_p, jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - return eval_can_substitute (loc, ctx, h, hvec, jump_target); - } - if (id_equal (name, "substitute")) - { - tree hvec = get_info_vec (loc, ctx, call, 1, non_constant_p, - overflow_p, jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - return eval_substitute (loc, ctx, h, hvec, jump_target); - } - if (id_equal (name, "data_member_spec")) - { - tree opts = get_nth_callarg (call, 1); - opts = cxx_eval_constant_expression (ctx, opts, vc_prvalue, - non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - return eval_data_member_spec (loc, ctx, h, opts, call, - non_constant_p, overflow_p, jump_target); - } - if (id_equal (name, "define_aggregate")) - { - tree hvec = get_info_vec (loc, ctx, call, 1, non_constant_p, - overflow_p, jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - return eval_define_aggregate (loc, ctx, h, hvec, call, non_constant_p); - } - if (id_equal (name, "members_of") - || id_equal (name, "static_data_members_of") - || id_equal (name, "nonstatic_data_members_of") - || id_equal (name, "bases_of") - || id_equal (name, "subobjects_of")) - { - tree actx = get_nth_callarg (call, 1); - actx = cxx_eval_constant_expression (ctx, actx, vc_prvalue, - non_constant_p, overflow_p, - jump_target); - if (*jump_target) - return NULL_TREE; - if (*non_constant_p) - return call; - if (id_equal (name, "members_of")) - return eval_members_of (loc, ctx, h, actx, call, non_constant_p, - jump_target); - else if (id_equal (name, "static_data_members_of")) - return eval_static_data_members_of (loc, ctx, h, actx, call, - non_constant_p, jump_target); - else if (id_equal (name, "nonstatic_data_members_of")) - return eval_nonstatic_data_members_of (loc, ctx, h, actx, call, + case METAFN_HAS_INACCESSIBLE_NONSTATIC_DATA_MEMBERS: + return eval_has_inaccessible_nonstatic_data_members (loc, ctx, h, expr, + call, + non_constant_p, + jump_target); + case METAFN_HAS_INACCESSIBLE_BASES: + return eval_has_inaccessible_bases (loc, ctx, h, expr, call, + non_constant_p, jump_target); + case METAFN_HAS_INACCESSIBLE_SUBOBJECTS: + return eval_has_inaccessible_subobjects (loc, ctx, h, expr, call, non_constant_p, jump_target); - else if (id_equal (name, "bases_of")) - return eval_bases_of (loc, ctx, h, actx, call, non_constant_p, + case METAFN_MEMBERS_OF: + return eval_members_of (loc, ctx, h, expr, call, non_constant_p, jump_target); - else if (id_equal (name, "subobjects_of")) - return eval_subobjects_of (loc, ctx, h, actx, call, non_constant_p, - jump_target); + case METAFN_BASES_OF: + return eval_bases_of (loc, ctx, h, expr, call, non_constant_p, + jump_target); + case METAFN_STATIC_DATA_MEMBERS_OF: + return eval_static_data_members_of (loc, ctx, h, expr, call, + non_constant_p, jump_target); + case METAFN_NONSTATIC_DATA_MEMBERS_OF: + return eval_nonstatic_data_members_of (loc, ctx, h, expr, call, + non_constant_p, jump_target); + case METAFN_SUBOBJECTS_OF: + return eval_subobjects_of (loc, ctx, h, expr, call, non_constant_p, + jump_target); + case METAFN_ENUMERATORS_OF: + return eval_enumerators_of (loc, ctx, h, jump_target); + case METAFN_OFFSET_OF: + return eval_offset_of (loc, ctx, h, kind, TREE_TYPE (call), jump_target); + case METAFN_SIZE_OF: + return eval_size_of (loc, ctx, h, kind, TREE_TYPE (call), jump_target); + case METAFN_ALIGNMENT_OF: + gcc_unreachable (); + case METAFN_BIT_SIZE_OF: + return eval_bit_size_of (loc, ctx, h, kind, TREE_TYPE (call), + jump_target); + case METAFN_EXTRACT: + gcc_unreachable (); + case METAFN_CAN_SUBSTITUTE: + return eval_can_substitute (loc, ctx, h, hvec, jump_target); + case METAFN_SUBSTITUTE: + return eval_substitute (loc, ctx, h, hvec, jump_target); + case METAFN_REFLECT_CONSTANT: + return eval_reflect_constant (loc, ctx, type, expr, jump_target); + case METAFN_REFLECT_OBJECT: + return eval_reflect_object (loc, ctx, type, expr, jump_target); + case METAFN_REFLECT_FUNCTION: + return eval_reflect_function (loc, ctx, type, expr, jump_target); + case METAFN_REFLECT_CONSTANT_STRING: + return eval_reflect_constant_string (loc, ctx, call, non_constant_p, + overflow_p, jump_target); + case METAFN_REFLECT_CONSTANT_ARRAY: + return eval_reflect_constant_array (loc, ctx, call, non_constant_p, + overflow_p, jump_target); + case METAFN_DATA_MEMBER_SPEC: + return eval_data_member_spec (loc, ctx, h, expr, call, + non_constant_p, overflow_p, jump_target); + case METAFN_IS_DATA_MEMBER_SPEC: + return eval_is_data_member_spec (h, kind); + case METAFN_DEFINE_AGGREGATE: + return eval_define_aggregate (loc, ctx, h, hvec, call, non_constant_p); + case METAFN_IS_VOID_TYPE: + return eval_is_void_type (h); + case METAFN_IS_NULL_POINTER_TYPE: + return eval_is_null_pointer_type (h); + case METAFN_IS_INTEGRAL_TYPE: + return eval_is_integral_type (h); + case METAFN_IS_FLOATING_POINT_TYPE: + return eval_is_floating_point_type (h); + case METAFN_IS_ARRAY_TYPE: + return eval_is_array_type (loc, h); + case METAFN_IS_POINTER_TYPE: + return eval_is_pointer_type (loc, h); + case METAFN_IS_LVALUE_REFERENCE_TYPE: + return eval_is_lvalue_reference_type (h); + case METAFN_IS_RVALUE_REFERENCE_TYPE: + return eval_is_rvalue_reference_type (h); + case METAFN_IS_MEMBER_OBJECT_POINTER_TYPE: + return eval_is_member_object_pointer_type (loc, h); + case METAFN_IS_MEMBER_FUNCTION_POINTER_TYPE: + return eval_is_member_function_pointer_type (loc, h); + case METAFN_IS_ENUM_TYPE: + return eval_is_enum_type (loc, h); + case METAFN_IS_UNION_TYPE: + return eval_is_union_type (loc, h); + case METAFN_IS_CLASS_TYPE: + return eval_is_class_type (loc, h); + case METAFN_IS_FUNCTION_TYPE: + return eval_is_function_type (h); + case METAFN_IS_REFLECTION_TYPE: + return eval_is_reflection_type (h); + case METAFN_IS_REFERENCE_TYPE: + return eval_is_reference_type (loc, h); + case METAFN_IS_ARITHMETIC_TYPE: + return eval_is_arithmetic_type (h); + case METAFN_IS_FUNDAMENTAL_TYPE: + return eval_is_fundamental_type (h); + case METAFN_IS_OBJECT_TYPE: + return eval_is_object_type (loc, h); + case METAFN_IS_SCALAR_TYPE: + return eval_is_scalar_type (h); + case METAFN_IS_COMPOUND_TYPE: + return eval_is_compound_type (h); + case METAFN_IS_MEMBER_POINTER_TYPE: + return eval_is_member_pointer_type (loc, h); + case METAFN_IS_CONST_TYPE: + return eval_is_const_type (h); + case METAFN_IS_VOLATILE_TYPE: + return eval_is_volatile_type (h); + case METAFN_IS_TRIVIALLY_COPYABLE_TYPE: + return eval_is_trivially_copyable_type (h); + case METAFN_IS_TRIVIALLY_RELOCATABLE_TYPE: + return eval_is_trivially_relocatable_type (h); + case METAFN_IS_REPLACEABLE_TYPE: + return eval_is_replaceable_type (h); + case METAFN_IS_STANDARD_LAYOUT_TYPE: + return eval_is_standard_layout_type (h); + case METAFN_IS_EMPTY_TYPE: + return eval_is_empty_type (loc, h); + case METAFN_IS_POLYMORPHIC_TYPE: + return eval_is_polymorphic_type (loc, h); + case METAFN_IS_ABSTRACT_TYPE: + return eval_is_abstract_type (h); + case METAFN_IS_FINAL_TYPE: + return eval_is_final_type (loc, h); + case METAFN_IS_AGGREGATE_TYPE: + return eval_is_aggregate_type (h); + case METAFN_IS_CONSTEVAL_ONLY_TYPE: + return eval_is_consteval_only_type (h); + case METAFN_IS_SIGNED_TYPE: + return eval_is_signed_type (h); + case METAFN_IS_UNSIGNED_TYPE: + return eval_is_unsigned_type (h); + case METAFN_IS_BOUNDED_ARRAY_TYPE: + return eval_is_bounded_array_type (loc, h); + case METAFN_IS_UNBOUNDED_ARRAY_TYPE: + return eval_is_unbounded_array_type (h); + case METAFN_IS_SCOPED_ENUM_TYPE: + return eval_is_scoped_enum_type (h); + case METAFN_IS_CONSTRUCTIBLE_TYPE: + return eval_is_constructible_type (h, hvec); + case METAFN_IS_DEFAULT_CONSTRUCTIBLE_TYPE: + return eval_is_default_constructible_type (h); + case METAFN_IS_COPY_CONSTRUCTIBLE_TYPE: + return eval_is_copy_constructible_type (h); + case METAFN_IS_MOVE_CONSTRUCTIBLE_TYPE: + return eval_is_move_constructible_type (h); + case METAFN_IS_ASSIGNABLE_TYPE: + return eval_is_assignable_type (loc, h, h1); + case METAFN_IS_COPY_ASSIGNABLE_TYPE: + return eval_is_copy_assignable_type (h); + case METAFN_IS_MOVE_ASSIGNABLE_TYPE: + return eval_is_move_assignable_type (h); + case METAFN_IS_SWAPPABLE_WITH_TYPE: + return eval_is_swappable_with_type (loc, ctx, h, h1, call, + non_constant_p, "is_swappable_with"); + case METAFN_IS_SWAPPABLE_TYPE: + return eval_is_swappable_type (loc, ctx, h, call, non_constant_p, + "is_swappable"); + case METAFN_IS_DESTRUCTIBLE_TYPE: + return eval_is_destructible_type (loc, h); + case METAFN_IS_TRIVIALLY_CONSTRUCTIBLE_TYPE: + return eval_is_trivially_constructible_type (h, hvec); + case METAFN_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_TYPE: + return eval_is_trivially_default_constructible_type (h); + case METAFN_IS_TRIVIALLY_COPY_CONSTRUCTIBLE_TYPE: + return eval_is_trivially_copy_constructible_type (h); + case METAFN_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE_TYPE: + return eval_is_trivially_move_constructible_type (h); + case METAFN_IS_TRIVIALLY_ASSIGNABLE_TYPE: + return eval_is_trivially_assignable_type (loc, h, h1); + case METAFN_IS_TRIVIALLY_COPY_ASSIGNABLE_TYPE: + return eval_is_trivially_copy_assignable_type (h); + case METAFN_IS_TRIVIALLY_MOVE_ASSIGNABLE_TYPE: + return eval_is_trivially_move_assignable_type (h); + case METAFN_IS_TRIVIALLY_DESTRUCTIBLE_TYPE: + return eval_is_trivially_destructible_type (loc, h); + case METAFN_IS_NOTHROW_CONSTRUCTIBLE_TYPE: + return eval_is_nothrow_constructible_type (h, hvec); + case METAFN_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE_TYPE: + return eval_is_nothrow_default_constructible_type (h); + case METAFN_IS_NOTHROW_COPY_CONSTRUCTIBLE_TYPE: + return eval_is_nothrow_copy_constructible_type (h); + case METAFN_IS_NOTHROW_MOVE_CONSTRUCTIBLE_TYPE: + return eval_is_nothrow_move_constructible_type (h); + case METAFN_IS_NOTHROW_ASSIGNABLE_TYPE: + return eval_is_nothrow_assignable_type (loc, h, h1); + case METAFN_IS_NOTHROW_COPY_ASSIGNABLE_TYPE: + return eval_is_nothrow_copy_assignable_type (h); + case METAFN_IS_NOTHROW_MOVE_ASSIGNABLE_TYPE: + return eval_is_nothrow_move_assignable_type (h); + case METAFN_IS_NOTHROW_SWAPPABLE_WITH_TYPE: + return eval_is_swappable_with_type (loc, ctx, h, h1, call, + non_constant_p, + "is_nothrow_swappable_with"); + case METAFN_IS_NOTHROW_SWAPPABLE_TYPE: + return eval_is_swappable_type (loc, ctx, h, call, non_constant_p, + "is_nothrow_swappable"); + case METAFN_IS_NOTHROW_DESTRUCTIBLE_TYPE: + return eval_is_nothrow_destructible_type (loc, h); + case METAFN_IS_NOTHROW_RELOCATABLE_TYPE: + return eval_is_nothrow_relocatable_type (loc, h); + case METAFN_IS_IMPLICIT_LIFETIME_TYPE: + return eval_is_implicit_lifetime_type (h); + case METAFN_HAS_VIRTUAL_DESTRUCTOR: + return eval_has_virtual_destructor (h); + case METAFN_HAS_UNIQUE_OBJECT_REPRESENTATIONS: + return eval_has_unique_object_representations (h); + case METAFN_REFERENCE_CONSTRUCTS_FROM_TEMPORARY: + return eval_reference_constructs_from_temporary (loc, h, h1); + case METAFN_REFERENCE_CONVERTS_FROM_TEMPORARY: + return eval_reference_converts_from_temporary (loc, h, h1); + case METAFN_RANK: + return eval_rank (h); + case METAFN_EXTENT: + return eval_extent (loc, h, expr); + case METAFN_IS_SAME_TYPE: + return eval_is_same_type (loc, h, h1); + case METAFN_IS_BASE_OF_TYPE: + return eval_is_base_of_type (loc, h, h1); + case METAFN_IS_VIRTUAL_BASE_OF_TYPE: + return eval_is_virtual_base_of_type (loc, h, h1); + case METAFN_IS_CONVERTIBLE_TYPE: + return eval_is_convertible_type (loc, h, h1); + case METAFN_IS_NOTHROW_CONVERTIBLE_TYPE: + return eval_is_nothrow_convertible_type (loc, h, h1); + case METAFN_IS_LAYOUT_COMPATIBLE_TYPE: + return eval_is_layout_compatible_type (loc, h, h1); + case METAFN_IS_POINTER_INTERCONVERTIBLE_BASE_OF_TYPE: + return eval_is_pointer_interconvertible_base_of_type (loc, h, h1); + case METAFN_IS_INVOCABLE_TYPE: + return eval_is_invocable_type (loc, h, hvec); + case METAFN_IS_INVOCABLE_R_TYPE: + return eval_is_invocable_r_type (loc, ctx, h, h1, hvec, call, + non_constant_p, "is_invocable_r"); + case METAFN_IS_NOTHROW_INVOCABLE_TYPE: + return eval_is_nothrow_invocable_type (loc, h, hvec); + case METAFN_IS_NOTHROW_INVOCABLE_R_TYPE: + return eval_is_invocable_r_type (loc, ctx, h, h1, hvec, call, + non_constant_p, + "is_nothrow_invocable_r"); + case METAFN_REMOVE_CONST: + return eval_remove_const (loc, h); + case METAFN_REMOVE_VOLATILE: + return eval_remove_volatile (loc, h); + case METAFN_REMOVE_CV: + return eval_remove_cv (loc, h); + case METAFN_ADD_CONST: + return eval_add_const (loc, h); + case METAFN_ADD_VOLATILE: + return eval_add_volatile (loc, h); + case METAFN_ADD_CV: + return eval_add_cv (loc, h); + case METAFN_REMOVE_REFERENCE: + return eval_remove_reference (loc, h); + case METAFN_ADD_LVALUE_REFERENCE: + return eval_add_lvalue_reference (loc, h); + case METAFN_ADD_RVALUE_REFERENCE: + return eval_add_rvalue_reference (loc, h); + case METAFN_MAKE_SIGNED: + return eval_make_signed (loc, ctx, h, false, jump_target); + case METAFN_MAKE_UNSIGNED: + return eval_make_signed (loc, ctx, h, true, jump_target); + case METAFN_REMOVE_EXTENT: + return eval_remove_extent (loc, h); + case METAFN_REMOVE_ALL_EXTENTS: + return eval_remove_all_extents (loc, h); + case METAFN_REMOVE_POINTER: + return eval_remove_pointer (loc, h); + case METAFN_ADD_POINTER: + return eval_add_pointer (loc, h); + case METAFN_REMOVE_CVREF: + return eval_remove_cvref (loc, h); + case METAFN_DECAY: + return eval_decay (loc, h); + case METAFN_COMMON_TYPE: + return eval_common_type (loc, ctx, hvec, call, non_constant_p, ident); + case METAFN_COMMON_REFERENCE: + return eval_common_type (loc, ctx, hvec, call, non_constant_p, ident); + case METAFN_UNDERLYING_TYPE: + return eval_underlying_type (loc, ctx, h, jump_target); + case METAFN_INVOKE_RESULT: + return eval_invoke_result (loc, ctx, h, hvec, call, non_constant_p); + case METAFN_UNWRAP_REFERENCE: + return eval_unwrap_reference (loc, ctx, h, call, non_constant_p, ident); + case METAFN_UNWRAP_REF_DECAY: + return eval_unwrap_reference (loc, ctx, h, call, non_constant_p, ident); + case METAFN_TUPLE_SIZE: + { + tree tsize = eval_tuple_size (h); + if (*jump_target) + return NULL_TREE; + if (!tsize || tsize == error_mark_node) + { + if (!cxx_constexpr_quiet_p (ctx)) + error_at (loc, "couldn%'t compute %qs of %qT", "tuple_size", h); + *non_constant_p = true; + return call; + } + return tsize; + } + case METAFN_TUPLE_ELEMENT: + { + tree type = eval_tuple_element (loc, expr, h1); + if (type == error_mark_node) + { + *non_constant_p = true; + return call; + } + return type; + } + case METAFN_VARIANT_SIZE: + return eval_variant_size (loc, ctx, h, call, non_constant_p); + case METAFN_VARIANT_ALTERNATIVE: + { + tree type = eval_variant_alternative (loc, expr, h1); + if (type == error_mark_node) + { + *non_constant_p = true; + return call; + } + return type; + } + case METAFN_TYPE_ORDER: + return eval_type_order (h, h1); + case METAFN_ANNOTATIONS_OF: + return eval_annotations_of (loc, ctx, h, kind, NULL_TREE, jump_target); + case METAFN_ANNOTATIONS_OF_WITH_TYPE: + return eval_annotations_of (loc, ctx, h, kind, h1, jump_target); + /* Special metafunctions. */ + case METAFN_ACCESS_CONTEXT_CURRENT: + if (DECL_CLASS_SCOPE_P (fun) + && TYPE_NAME (DECL_CONTEXT (fun)) + && TREE_CODE (TYPE_NAME (DECL_CONTEXT (fun))) == TYPE_DECL + && DECL_NAME (TYPE_NAME (DECL_CONTEXT (fun))) + && id_equal (DECL_NAME (TYPE_NAME (DECL_CONTEXT (fun))), + "access_context")) + return eval_access_context_current (loc, ctx, call, non_constant_p); + goto not_found; } - -not_found: - sorry ("%qE", name); - return error_mark_node; + goto not_found; } /* Splice reflection REFL; i.e., return its entity. */