https://gcc.gnu.org/g:b34f04aea55821c2fbd4af452120718af15b24f5
commit r16-8475-gb34f04aea55821c2fbd4af452120718af15b24f5 Author: Jakub Jelinek <[email protected]> Date: Sun Apr 5 18:06:34 2026 +0200 c++: Error recovery for fuzzed <meta> [PR124689] I knew this was coming, but hoped it would come later ;) Basically, when one preprocesses <meta> + some reflection code and attempts to fuzz it, we can ICE in various ways as we expect a sane <meta>. In various places we've already tried to be defensive, error out e.g. when we don't find the members we are looking for in <meta> classes etc., plus when adding metafns.gperf I've added to the details about each metafn the types of arguments and return type (which was only partially used to evaluate e.g. the arguments in different ways and prepare for the eval_* handlers, but checking of the types wasn't actually done. This patch introduces some limited checking of the return type and argument types to make sure they are sane. Plus I've noticed the can_substitute marking said incorrectly it returns info when it returns bool. The reflection_range/input_range arguments aren't checked, because they can be all kinds of things and get_range_elts already does a lot of checking. Similarly METAFN_KIND_ARG_TEMPLATE_PARM*, those aren't even argument types, just a hack to tell the code that it needs to supply the template parameter to the eval_* handlers. 2026-04-05 Jakub Jelinek <[email protected]> PR c++/124689 * metafns.gperf (enum metafn_kind): Add METAFN_KIND_BOOL_INFO_REFLECTION_RANGE. (can_substitute): Use METAFN_KIND_BOOL_INFO_REFLECTION_RANGE instead of METAFN_KIND_INFO_INFO_REFLECTION_RANGE. (METAFN_KIND_ARG): Add MINFO argument. (METAFN_KIND_RET): Define. * reflect.cc (is_std_meta_class): New function. (get_info): Add LOC argument, diagnose invalid argument type instead of failing assertion. (check_metafn_arg_type): New function. (check_metafn_return_type): New function. (process_metafunction): Diagnose clearly invalid return or argument types. Use rettype variable instead of TREE_TYPE (call). * metafns.h: Regenerate. * g++.dg/reflect/pr124689.C: New test. Reviewed-by: Jason Merrill <[email protected]> Diff: --- gcc/cp/metafns.gperf | 18 +- gcc/cp/metafns.h | 496 ++++++++++++++++---------------- gcc/cp/reflect.cc | 212 ++++++++++++-- gcc/testsuite/g++.dg/reflect/pr124689.C | 58 ++++ 4 files changed, 517 insertions(+), 267 deletions(-) diff --git a/gcc/cp/metafns.gperf b/gcc/cp/metafns.gperf index 89e31866b03b..7fd6a6a3dd80 100644 --- a/gcc/cp/metafns.gperf +++ b/gcc/cp/metafns.gperf @@ -268,10 +268,6 @@ enum { METAFN_KIND_MASK = (1 << METAFN_KIND_SHIFT) - 1 }; -/* Get the metafn_kind_arg for argument ARGNO. */ -#define METAFN_KIND_ARG(ARGNO) \ - ((minfo->kind >> ((ARGNO + 1) * METAFN_KIND_SHIFT)) & METAFN_KIND_MASK) - /* Possible return types of metafunctions. */ enum metafn_kind_ret { METAFN_KIND_RET_BOOL, @@ -289,6 +285,10 @@ enum metafn_kind_ret { }; static_assert (METAFN_KIND_RET_TEMPLATE_PARM <= (int) METAFN_KIND_MASK, ""); +/* Get the metafn_kind_ret. */ +#define METAFN_KIND_RET(MINFO) \ + ((metafn_kind_ret) (((int) (MINFO)->kind) & METAFN_KIND_MASK)) + /* Possible argument types of metafunctions. */ enum metafn_kind_arg { METAFN_KIND_ARG_VOID = 0, @@ -309,6 +309,11 @@ enum metafn_kind_arg { static_assert (METAFN_KIND_ARG_TEMPLATE_PARM_REF <= (int) METAFN_KIND_MASK, ""); +/* Get the metafn_kind_arg for argument ARGNO. */ +#define METAFN_KIND_ARG(MINFO, ARGNO) \ + ((metafn_kind_arg) (((MINFO)->kind >> ((ARGNO + 1) * METAFN_KIND_SHIFT)) \ + & METAFN_KIND_MASK)) + /* Possible sets of 0-3 arguments of metafunctions. */ enum metafn_kind_args { METAFN_KIND_ARGS_VOID = METAFN_KIND_ARG_VOID, @@ -382,6 +387,9 @@ enum metafn_kind { METAFN_KIND_INFO_REFLECTION_RANGET = (METAFN_KIND_ARGS_REFLECTION_RANGET << METAFN_KIND_SHIFT) | METAFN_KIND_RET_INFO, + METAFN_KIND_BOOL_INFO_REFLECTION_RANGE + = (METAFN_KIND_ARGS_INFO_REFLECTION_RANGE << METAFN_KIND_SHIFT) + | METAFN_KIND_RET_BOOL, METAFN_KIND_INFO_INFO_REFLECTION_RANGE = (METAFN_KIND_ARGS_INFO_REFLECTION_RANGE << METAFN_KIND_SHIFT) | METAFN_KIND_RET_INFO, @@ -574,7 +582,7 @@ 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, +can_substitute, METAFN_CAN_SUBSTITUTE, METAFN_KIND_BOOL_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, diff --git a/gcc/cp/metafns.h b/gcc/cp/metafns.h index f47545c48db5..c9644edb99ef 100644 --- a/gcc/cp/metafns.h +++ b/gcc/cp/metafns.h @@ -296,10 +296,6 @@ enum { METAFN_KIND_MASK = (1 << METAFN_KIND_SHIFT) - 1 }; -/* Get the metafn_kind_arg for argument ARGNO. */ -#define METAFN_KIND_ARG(ARGNO) \ - ((minfo->kind >> ((ARGNO + 1) * METAFN_KIND_SHIFT)) & METAFN_KIND_MASK) - /* Possible return types of metafunctions. */ enum metafn_kind_ret { METAFN_KIND_RET_BOOL, @@ -317,6 +313,10 @@ enum metafn_kind_ret { }; static_assert (METAFN_KIND_RET_TEMPLATE_PARM <= (int) METAFN_KIND_MASK, ""); +/* Get the metafn_kind_ret. */ +#define METAFN_KIND_RET(MINFO) \ + ((metafn_kind_ret) (((int) (MINFO)->kind) & METAFN_KIND_MASK)) + /* Possible argument types of metafunctions. */ enum metafn_kind_arg { METAFN_KIND_ARG_VOID = 0, @@ -337,6 +337,11 @@ enum metafn_kind_arg { static_assert (METAFN_KIND_ARG_TEMPLATE_PARM_REF <= (int) METAFN_KIND_MASK, ""); +/* Get the metafn_kind_arg for argument ARGNO. */ +#define METAFN_KIND_ARG(MINFO, ARGNO) \ + ((metafn_kind_arg) (((MINFO)->kind >> ((ARGNO + 1) * METAFN_KIND_SHIFT)) \ + & METAFN_KIND_MASK)) + /* Possible sets of 0-3 arguments of metafunctions. */ enum metafn_kind_args { METAFN_KIND_ARGS_VOID = METAFN_KIND_ARG_VOID, @@ -410,6 +415,9 @@ enum metafn_kind { METAFN_KIND_INFO_REFLECTION_RANGET = (METAFN_KIND_ARGS_REFLECTION_RANGET << METAFN_KIND_SHIFT) | METAFN_KIND_RET_INFO, + METAFN_KIND_BOOL_INFO_REFLECTION_RANGE + = (METAFN_KIND_ARGS_INFO_REFLECTION_RANGE << METAFN_KIND_SHIFT) + | METAFN_KIND_RET_BOOL, METAFN_KIND_INFO_INFO_REFLECTION_RANGE = (METAFN_KIND_ARGS_INFO_REFLECTION_RANGE << METAFN_KIND_SHIFT) | METAFN_KIND_RET_INFO, @@ -478,7 +486,7 @@ enum metafn_kind { = (METAFN_KIND_ARGS_INPUT_RANGE << METAFN_KIND_SHIFT) | METAFN_KIND_RET_U8STRING_VIEW }; -#line 454 "metafns.gperf" +#line 462 "metafns.gperf" struct metafn_info { /* A name within "std::meta::" (or "std::meta::access_context::"). */ @@ -602,481 +610,481 @@ metafn_lookup::find (const char *str, size_t len) #endif static const struct metafn_info wordlist[] = { -#line 658 "metafns.gperf" +#line 666 "metafns.gperf" {"rank", METAFN_RANK, METAFN_KIND_SIZE_T_TINFO,}, -#line 587 "metafns.gperf" +#line 595 "metafns.gperf" {"is_void_type", METAFN_IS_VOID_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 592 "metafns.gperf" +#line 600 "metafns.gperf" {"is_pointer_type", METAFN_IS_POINTER_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 495 "metafns.gperf" +#line 503 "metafns.gperf" {"is_volatile", METAFN_IS_VOLATILE, METAFN_KIND_BOOL_INFO,}, -#line 541 "metafns.gperf" +#line 549 "metafns.gperf" {"is_value", METAFN_IS_VALUE, METAFN_KIND_BOOL_INFO,}, -#line 548 "metafns.gperf" +#line 556 "metafns.gperf" {"is_base", METAFN_IS_BASE, METAFN_KIND_BOOL_INFO,}, -#line 480 "metafns.gperf" +#line 488 "metafns.gperf" {"is_private", METAFN_IS_PRIVATE, METAFN_KIND_BOOL_INFO,}, -#line 509 "metafns.gperf" +#line 517 "metafns.gperf" {"is_variable", METAFN_IS_VARIABLE, METAFN_KIND_BOOL_INFO,}, -#line 664 "metafns.gperf" +#line 672 "metafns.gperf" {"is_nothrow_convertible_type", METAFN_IS_NOTHROW_CONVERTIBLE_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, -#line 643 "metafns.gperf" +#line 651 "metafns.gperf" {"is_nothrow_constructible_type", METAFN_IS_NOTHROW_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO_REFLECTION_RANGET,}, -#line 669 "metafns.gperf" +#line 677 "metafns.gperf" {"is_nothrow_invocable_type", METAFN_IS_NOTHROW_INVOCABLE_TYPE, METAFN_KIND_BOOL_TINFO_REFLECTION_RANGET,}, -#line 648 "metafns.gperf" +#line 656 "metafns.gperf" {"is_nothrow_copy_assignable_type", METAFN_IS_NOTHROW_COPY_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 670 "metafns.gperf" +#line 678 "metafns.gperf" {"is_nothrow_invocable_r_type", METAFN_IS_NOTHROW_INVOCABLE_R_TYPE, METAFN_KIND_BOOL_TINFO_TINFO_REFLECTION_RANGET,}, -#line 645 "metafns.gperf" +#line 653 "metafns.gperf" {"is_nothrow_copy_constructible_type", METAFN_IS_NOTHROW_COPY_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 661 "metafns.gperf" +#line 669 "metafns.gperf" {"is_base_of_type", METAFN_IS_BASE_OF_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, -#line 649 "metafns.gperf" +#line 657 "metafns.gperf" {"is_nothrow_move_assignable_type", METAFN_IS_NOTHROW_MOVE_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 660 "metafns.gperf" +#line 668 "metafns.gperf" {"is_same_type", METAFN_IS_SAME_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, -#line 646 "metafns.gperf" +#line 654 "metafns.gperf" {"is_nothrow_move_constructible_type", METAFN_IS_NOTHROW_MOVE_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 533 "metafns.gperf" +#line 541 "metafns.gperf" {"is_variable_template", METAFN_IS_VARIABLE_TEMPLATE, METAFN_KIND_BOOL_INFO,}, -#line 588 "metafns.gperf" +#line 596 "metafns.gperf" {"is_null_pointer_type", METAFN_IS_NULL_POINTER_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 647 "metafns.gperf" +#line 655 "metafns.gperf" {"is_nothrow_assignable_type", METAFN_IS_NOTHROW_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, -#line 652 "metafns.gperf" +#line 660 "metafns.gperf" {"is_nothrow_destructible_type", METAFN_IS_NOTHROW_DESTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 478 "metafns.gperf" +#line 486 "metafns.gperf" {"is_public", METAFN_IS_PUBLIC, METAFN_KIND_BOOL_INFO,}, -#line 490 "metafns.gperf" +#line 498 "metafns.gperf" {"is_noexcept", METAFN_IS_NOEXCEPT, METAFN_KIND_BOOL_INFO,}, -#line 576 "metafns.gperf" +#line 584 "metafns.gperf" {"extract", METAFN_EXTRACT, METAFN_KIND_TEMPLATE_PARM_INFO,}, -#line 697 "metafns.gperf" +#line 705 "metafns.gperf" {"variant_alternative", METAFN_VARIANT_ALTERNATIVE, METAFN_KIND_INFO_SIZE_T_TINFO,}, -#line 614 "metafns.gperf" +#line 622 "metafns.gperf" {"is_polymorphic_type", METAFN_IS_POLYMORPHIC_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 514 "metafns.gperf" +#line 522 "metafns.gperf" {"is_function", METAFN_IS_FUNCTION, METAFN_KIND_BOOL_INFO,}, -#line 511 "metafns.gperf" +#line 519 "metafns.gperf" {"is_namespace", METAFN_IS_NAMESPACE, METAFN_KIND_BOOL_INFO,}, -#line 467 "metafns.gperf" +#line 475 "metafns.gperf" {"symbol_of", METAFN_SYMBOL_OF, METAFN_KIND_STRING_VIEW_OPERATORS,}, -#line 666 "metafns.gperf" +#line 674 "metafns.gperf" {"is_pointer_interconvertible_base_of_type", METAFN_IS_POINTER_INTERCONVERTIBLE_BASE_OF_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, -#line 622 "metafns.gperf" +#line 630 "metafns.gperf" {"is_bounded_array_type", METAFN_IS_BOUNDED_ARRAY_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 696 "metafns.gperf" +#line 704 "metafns.gperf" {"variant_size", METAFN_VARIANT_SIZE, METAFN_KIND_SIZE_T_TINFO,}, -#line 494 "metafns.gperf" +#line 502 "metafns.gperf" {"is_const", METAFN_IS_CONST, METAFN_KIND_BOOL_INFO,}, -#line 540 "metafns.gperf" +#line 548 "metafns.gperf" {"is_concept", METAFN_IS_CONCEPT, METAFN_KIND_BOOL_INFO,}, -#line 510 "metafns.gperf" +#line 518 "metafns.gperf" {"is_type", METAFN_IS_TYPE, METAFN_KIND_BOOL_INFO,}, -#line 567 "metafns.gperf" +#line 575 "metafns.gperf" {"bases_of", METAFN_BASES_OF, METAFN_KIND_VECTOR_INFO_INFO_ACCESS_CONTEXT,}, -#line 532 "metafns.gperf" +#line 540 "metafns.gperf" {"is_function_template", METAFN_IS_FUNCTION_TEMPLATE, METAFN_KIND_BOOL_INFO,}, -#line 515 "metafns.gperf" +#line 523 "metafns.gperf" {"is_conversion_function", METAFN_IS_CONVERSION_FUNCTION, METAFN_KIND_BOOL_INFO,}, -#line 630 "metafns.gperf" +#line 638 "metafns.gperf" {"is_copy_assignable_type", METAFN_IS_COPY_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 663 "metafns.gperf" +#line 671 "metafns.gperf" {"is_convertible_type", METAFN_IS_CONVERTIBLE_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, -#line 653 "metafns.gperf" +#line 661 "metafns.gperf" {"is_implicit_lifetime_type", METAFN_IS_IMPLICIT_LIFETIME_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 698 "metafns.gperf" +#line 706 "metafns.gperf" {"type_order", METAFN_TYPE_ORDER, METAFN_KIND_STRONG_ORDERING_TINFO_TINFO,}, -#line 531 "metafns.gperf" +#line 539 "metafns.gperf" {"is_template", METAFN_IS_TEMPLATE, METAFN_KIND_BOOL_INFO,}, -#line 644 "metafns.gperf" +#line 652 "metafns.gperf" {"is_nothrow_default_constructible_type", METAFN_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 577 "metafns.gperf" - {"can_substitute", METAFN_CAN_SUBSTITUTE, METAFN_KIND_INFO_INFO_REFLECTION_RANGE,}, -#line 536 "metafns.gperf" +#line 585 "metafns.gperf" + {"can_substitute", METAFN_CAN_SUBSTITUTE, METAFN_KIND_BOOL_INFO_REFLECTION_RANGE,}, +#line 544 "metafns.gperf" {"is_conversion_function_template", METAFN_IS_CONVERSION_FUNCTION_TEMPLATE, METAFN_KIND_BOOL_INFO,}, -#line 524 "metafns.gperf" +#line 532 "metafns.gperf" {"is_copy_assignment", METAFN_IS_COPY_ASSIGNMENT, METAFN_KIND_BOOL_INFO,}, -#line 627 "metafns.gperf" +#line 635 "metafns.gperf" {"is_copy_constructible_type", METAFN_IS_COPY_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 573 "metafns.gperf" +#line 581 "metafns.gperf" {"size_of", METAFN_SIZE_OF, METAFN_KIND_SIZE_T_INFO,}, -#line 475 "metafns.gperf" +#line 483 "metafns.gperf" {"type_of", METAFN_TYPE_OF, METAFN_KIND_INFO_INFO,}, -#line 512 "metafns.gperf" +#line 520 "metafns.gperf" {"is_type_alias", METAFN_IS_TYPE_ALIAS, METAFN_KIND_BOOL_INFO,}, -#line 625 "metafns.gperf" - {"is_constructible_type", METAFN_IS_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO_REFLECTION_RANGET,}, #line 633 "metafns.gperf" + {"is_constructible_type", METAFN_IS_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO_REFLECTION_RANGET,}, +#line 641 "metafns.gperf" {"is_swappable_type", METAFN_IS_SWAPPABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 503 "metafns.gperf" +#line 511 "metafns.gperf" {"has_module_linkage", METAFN_HAS_MODULE_LINKAGE, METAFN_KIND_BOOL_INFO,}, -#line 530 "metafns.gperf" +#line 538 "metafns.gperf" {"is_vararg_function", METAFN_IS_VARARG_FUNCTION, METAFN_KIND_BOOL_INFO,}, -#line 521 "metafns.gperf" +#line 529 "metafns.gperf" {"is_copy_constructor", METAFN_IS_COPY_CONSTRUCTOR, METAFN_KIND_BOOL_INFO,}, -#line 694 "metafns.gperf" +#line 702 "metafns.gperf" {"tuple_size", METAFN_TUPLE_SIZE, METAFN_KIND_SIZE_T_TINFO,}, -#line 557 "metafns.gperf" +#line 565 "metafns.gperf" {"variable_of", METAFN_VARIABLE_OF, METAFN_KIND_INFO_INFO,}, -#line 601 "metafns.gperf" +#line 609 "metafns.gperf" {"is_reflection_type", METAFN_IS_REFLECTION_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 575 "metafns.gperf" +#line 583 "metafns.gperf" {"bit_size_of", METAFN_BIT_SIZE_OF, METAFN_KIND_SIZE_T_INFO,}, -#line 604 "metafns.gperf" +#line 612 "metafns.gperf" {"is_fundamental_type", METAFN_IS_FUNDAMENTAL_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 665 "metafns.gperf" +#line 673 "metafns.gperf" {"is_layout_compatible_type", METAFN_IS_LAYOUT_COMPATIBLE_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, -#line 701 "metafns.gperf" +#line 709 "metafns.gperf" {"current", METAFN_ACCESS_CONTEXT_CURRENT, METAFN_KIND_ACCESS_CONTEXT_VOID,}, -#line 563 "metafns.gperf" +#line 571 "metafns.gperf" {"current_function", METAFN_CURRENT_FUNCTION, METAFN_KIND_INFO_VOID,}, -#line 539 "metafns.gperf" +#line 547 "metafns.gperf" {"is_constructor_template", METAFN_IS_CONSTRUCTOR_TEMPLATE, METAFN_KIND_BOOL_INFO,}, -#line 688 "metafns.gperf" +#line 696 "metafns.gperf" {"common_type", METAFN_COMMON_TYPE, METAFN_KIND_INFO_REFLECTION_RANGET,}, -#line 631 "metafns.gperf" +#line 639 "metafns.gperf" {"is_move_assignable_type", METAFN_IS_MOVE_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 689 "metafns.gperf" +#line 697 "metafns.gperf" {"common_reference", METAFN_COMMON_REFERENCE, METAFN_KIND_INFO_REFLECTION_RANGET,}, -#line 695 "metafns.gperf" +#line 703 "metafns.gperf" {"tuple_element", METAFN_TUPLE_ELEMENT, METAFN_KIND_INFO_SIZE_T_TINFO,}, -#line 581 "metafns.gperf" +#line 589 "metafns.gperf" {"reflect_function", METAFN_REFLECT_FUNCTION, METAFN_KIND_INFO_TEMPLATE_PARM_REF,}, -#line 501 "metafns.gperf" +#line 509 "metafns.gperf" {"has_automatic_storage_duration", METAFN_HAS_AUTOMATIC_STORAGE_DURATION, METAFN_KIND_BOOL_INFO,}, -#line 525 "metafns.gperf" +#line 533 "metafns.gperf" {"is_move_assignment", METAFN_IS_MOVE_ASSIGNMENT, METAFN_KIND_BOOL_INFO,}, -#line 519 "metafns.gperf" +#line 527 "metafns.gperf" {"is_constructor", METAFN_IS_CONSTRUCTOR, METAFN_KIND_BOOL_INFO,}, -#line 550 "metafns.gperf" +#line 558 "metafns.gperf" {"has_parent", METAFN_HAS_PARENT, METAFN_KIND_BOOL_INFO,}, -#line 628 "metafns.gperf" +#line 636 "metafns.gperf" {"is_move_constructible_type", METAFN_IS_MOVE_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 651 "metafns.gperf" +#line 659 "metafns.gperf" {"is_nothrow_swappable_type", METAFN_IS_NOTHROW_SWAPPABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 611 "metafns.gperf" +#line 619 "metafns.gperf" {"is_trivially_copyable_type", METAFN_IS_TRIVIALLY_COPYABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 602 "metafns.gperf" +#line 610 "metafns.gperf" {"is_reference_type", METAFN_IS_REFERENCE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 594 "metafns.gperf" +#line 602 "metafns.gperf" {"is_rvalue_reference_type", METAFN_IS_RVALUE_REFERENCE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 650 "metafns.gperf" +#line 658 "metafns.gperf" {"is_nothrow_swappable_with_type", METAFN_IS_NOTHROW_SWAPPABLE_WITH_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, -#line 635 "metafns.gperf" +#line 643 "metafns.gperf" {"is_trivially_constructible_type", METAFN_IS_TRIVIALLY_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO_REFLECTION_RANGET,}, -#line 632 "metafns.gperf" - {"is_swappable_with_type", METAFN_IS_SWAPPABLE_WITH_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, #line 640 "metafns.gperf" + {"is_swappable_with_type", METAFN_IS_SWAPPABLE_WITH_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, +#line 648 "metafns.gperf" {"is_trivially_copy_assignable_type", METAFN_IS_TRIVIALLY_COPY_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 690 "metafns.gperf" +#line 698 "metafns.gperf" {"underlying_type", METAFN_UNDERLYING_TYPE, METAFN_KIND_INFO_TINFO,}, -#line 637 "metafns.gperf" +#line 645 "metafns.gperf" {"is_trivially_copy_constructible_type", METAFN_IS_TRIVIALLY_COPY_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 608 "metafns.gperf" +#line 616 "metafns.gperf" {"is_member_pointer_type", METAFN_IS_MEMBER_POINTER_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 578 "metafns.gperf" +#line 586 "metafns.gperf" {"substitute", METAFN_SUBSTITUTE, METAFN_KIND_INFO_INFO_REFLECTION_RANGE,}, -#line 556 "metafns.gperf" +#line 564 "metafns.gperf" {"parameters_of", METAFN_PARAMETERS_OF, METAFN_KIND_VECTOR_INFO_INFO,}, -#line 522 "metafns.gperf" +#line 530 "metafns.gperf" {"is_move_constructor", METAFN_IS_MOVE_CONSTRUCTOR, METAFN_KIND_BOOL_INFO,}, -#line 549 "metafns.gperf" +#line 557 "metafns.gperf" {"has_default_member_initializer", METAFN_HAS_DEFAULT_MEMBER_INITIALIZER, METAFN_KIND_BOOL_INFO,}, -#line 518 "metafns.gperf" +#line 526 "metafns.gperf" {"is_special_member_function", METAFN_IS_SPECIAL_MEMBER_FUNCTION, METAFN_KIND_BOOL_INFO,}, -#line 613 "metafns.gperf" +#line 621 "metafns.gperf" {"is_empty_type", METAFN_IS_EMPTY_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 629 "metafns.gperf" +#line 637 "metafns.gperf" {"is_assignable_type", METAFN_IS_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, -#line 593 "metafns.gperf" +#line 601 "metafns.gperf" {"is_lvalue_reference_type", METAFN_IS_LVALUE_REFERENCE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 529 "metafns.gperf" +#line 537 "metafns.gperf" {"has_default_argument", METAFN_HAS_DEFAULT_ARGUMENT, METAFN_KIND_BOOL_INFO,}, -#line 692 "metafns.gperf" +#line 700 "metafns.gperf" {"unwrap_reference", METAFN_UNWRAP_REFERENCE, METAFN_KIND_INFO_TINFO,}, -#line 523 "metafns.gperf" +#line 531 "metafns.gperf" {"is_assignment", METAFN_IS_ASSIGNMENT, METAFN_KIND_BOOL_INFO,}, -#line 610 "metafns.gperf" +#line 618 "metafns.gperf" {"is_volatile_type", METAFN_IS_VOLATILE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 544 "metafns.gperf" +#line 552 "metafns.gperf" {"is_class_member", METAFN_IS_CLASS_MEMBER, METAFN_KIND_BOOL_INFO,}, -#line 603 "metafns.gperf" +#line 611 "metafns.gperf" {"is_arithmetic_type", METAFN_IS_ARITHMETIC_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 545 "metafns.gperf" +#line 553 "metafns.gperf" {"is_namespace_member", METAFN_IS_NAMESPACE_MEMBER, METAFN_KIND_BOOL_INFO,}, -#line 566 "metafns.gperf" +#line 574 "metafns.gperf" {"members_of", METAFN_MEMBERS_OF, METAFN_KIND_VECTOR_INFO_INFO_ACCESS_CONTEXT,}, -#line 479 "metafns.gperf" +#line 487 "metafns.gperf" {"is_protected", METAFN_IS_PROTECTED, METAFN_KIND_BOOL_INFO,}, -#line 506 "metafns.gperf" +#line 514 "metafns.gperf" {"has_linkage", METAFN_HAS_LINKAGE, METAFN_KIND_BOOL_INFO,}, -#line 470 "metafns.gperf" +#line 478 "metafns.gperf" {"identifier_of", METAFN_IDENTIFIER_OF, METAFN_KIND_STRING_VIEW_INFO,}, -#line 679 "metafns.gperf" +#line 687 "metafns.gperf" {"add_rvalue_reference", METAFN_ADD_RVALUE_REFERENCE, METAFN_KIND_INFO_TINFO,}, -#line 554 "metafns.gperf" +#line 562 "metafns.gperf" {"template_of", METAFN_TEMPLATE_OF, METAFN_KIND_INFO_INFO,}, -#line 513 "metafns.gperf" +#line 521 "metafns.gperf" {"is_namespace_alias", METAFN_IS_NAMESPACE_ALIAS, METAFN_KIND_BOOL_INFO,}, -#line 659 "metafns.gperf" +#line 667 "metafns.gperf" {"extent", METAFN_EXTENT, METAFN_KIND_SIZE_T_TINFO_UNSIGNED,}, -#line 597 "metafns.gperf" +#line 605 "metafns.gperf" {"is_enum_type", METAFN_IS_ENUM_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 534 "metafns.gperf" +#line 542 "metafns.gperf" {"is_class_template", METAFN_IS_CLASS_TEMPLATE, METAFN_KIND_BOOL_INFO,}, -#line 619 "metafns.gperf" +#line 627 "metafns.gperf" {"is_structural_type", METAFN_IS_STRUCTURAL_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 609 "metafns.gperf" +#line 617 "metafns.gperf" {"is_const_type", METAFN_IS_CONST_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 565 "metafns.gperf" +#line 573 "metafns.gperf" {"current_namespace", METAFN_CURRENT_NAMESPACE, METAFN_KIND_INFO_VOID,}, -#line 489 "metafns.gperf" +#line 497 "metafns.gperf" {"is_explicit", METAFN_IS_EXPLICIT, METAFN_KIND_BOOL_INFO,}, -#line 685 "metafns.gperf" +#line 693 "metafns.gperf" {"add_pointer", METAFN_ADD_POINTER, METAFN_KIND_INFO_TINFO,}, -#line 641 "metafns.gperf" +#line 649 "metafns.gperf" {"is_trivially_move_assignable_type", METAFN_IS_TRIVIALLY_MOVE_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 507 "metafns.gperf" +#line 515 "metafns.gperf" {"is_complete_type", METAFN_IS_COMPLETE_TYPE, METAFN_KIND_BOOL_INFO,}, -#line 638 "metafns.gperf" +#line 646 "metafns.gperf" {"is_trivially_move_constructible_type", METAFN_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 606 "metafns.gperf" +#line 614 "metafns.gperf" {"is_scalar_type", METAFN_IS_SCALAR_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 482 "metafns.gperf" +#line 490 "metafns.gperf" {"is_pure_virtual", METAFN_IS_PURE_VIRTUAL, METAFN_KIND_BOOL_INFO,}, -#line 527 "metafns.gperf" +#line 535 "metafns.gperf" {"is_function_parameter", METAFN_IS_FUNCTION_PARAMETER, METAFN_KIND_BOOL_INFO,}, -#line 508 "metafns.gperf" +#line 516 "metafns.gperf" {"is_enumerable_type", METAFN_IS_ENUMERABLE_TYPE, METAFN_KIND_BOOL_INFO,}, -#line 600 "metafns.gperf" +#line 608 "metafns.gperf" {"is_function_type", METAFN_IS_FUNCTION_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 551 "metafns.gperf" +#line 559 "metafns.gperf" {"parent_of", METAFN_PARENT_OF, METAFN_KIND_INFO_INFO,}, -#line 546 "metafns.gperf" +#line 554 "metafns.gperf" {"is_nonstatic_data_member", METAFN_IS_NONSTATIC_DATA_MEMBER, METAFN_KIND_BOOL_INFO,}, -#line 543 "metafns.gperf" +#line 551 "metafns.gperf" {"is_structured_binding", METAFN_IS_STRUCTURED_BINDING, METAFN_KIND_BOOL_INFO,}, -#line 496 "metafns.gperf" +#line 504 "metafns.gperf" {"is_mutable_member", METAFN_IS_MUTABLE_MEMBER, METAFN_KIND_BOOL_INFO,}, -#line 639 "metafns.gperf" +#line 647 "metafns.gperf" {"is_trivially_assignable_type", METAFN_IS_TRIVIALLY_ASSIGNABLE_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, -#line 626 "metafns.gperf" +#line 634 "metafns.gperf" {"is_default_constructible_type", METAFN_IS_DEFAULT_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 528 "metafns.gperf" +#line 536 "metafns.gperf" {"is_explicit_object_parameter", METAFN_IS_EXPLICIT_OBJECT_PARAMETER, METAFN_KIND_BOOL_INFO,}, -#line 675 "metafns.gperf" +#line 683 "metafns.gperf" {"add_volatile", METAFN_ADD_VOLATILE, METAFN_KIND_INFO_TINFO,}, -#line 564 "metafns.gperf" +#line 572 "metafns.gperf" {"current_class", METAFN_CURRENT_CLASS, METAFN_KIND_INFO_VOID,}, -#line 571 "metafns.gperf" +#line 579 "metafns.gperf" {"enumerators_of", METAFN_ENUMERATORS_OF, METAFN_KIND_VECTOR_INFO_INFO,}, -#line 492 "metafns.gperf" +#line 500 "metafns.gperf" {"is_enumerator", METAFN_IS_ENUMERATOR, METAFN_KIND_BOOL_INFO,}, -#line 542 "metafns.gperf" +#line 550 "metafns.gperf" {"is_object", METAFN_IS_OBJECT, METAFN_KIND_BOOL_INFO,}, -#line 473 "metafns.gperf" +#line 481 "metafns.gperf" {"u8display_string_of", METAFN_U8DISPLAY_STRING_OF, METAFN_KIND_U8STRING_VIEW_INFO,}, -#line 596 "metafns.gperf" +#line 604 "metafns.gperf" {"is_member_function_pointer_type", METAFN_IS_MEMBER_FUNCTION_POINTER_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 654 "metafns.gperf" +#line 662 "metafns.gperf" {"has_virtual_destructor", METAFN_HAS_VIRTUAL_DESTRUCTOR, METAFN_KIND_BOOL_TINFO,}, -#line 657 "metafns.gperf" +#line 665 "metafns.gperf" {"reference_converts_from_temporary", METAFN_REFERENCE_CONVERTS_FROM_TEMPORARY, METAFN_KIND_BOOL_TINFO_TINFO,}, -#line 520 "metafns.gperf" +#line 528 "metafns.gperf" {"is_default_constructor", METAFN_IS_DEFAULT_CONSTRUCTOR, METAFN_KIND_BOOL_INFO,}, -#line 605 "metafns.gperf" +#line 613 "metafns.gperf" {"is_object_type", METAFN_IS_OBJECT_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 579 "metafns.gperf" +#line 587 "metafns.gperf" {"reflect_constant", METAFN_REFLECT_CONSTANT, METAFN_KIND_INFO_TEMPLATE_PARM,}, -#line 526 "metafns.gperf" +#line 534 "metafns.gperf" {"is_destructor", METAFN_IS_DESTRUCTOR, METAFN_KIND_BOOL_INFO,}, -#line 483 "metafns.gperf" +#line 491 "metafns.gperf" {"is_override", METAFN_IS_OVERRIDE, METAFN_KIND_BOOL_INFO,}, -#line 656 "metafns.gperf" +#line 664 "metafns.gperf" {"reference_constructs_from_temporary", METAFN_REFERENCE_CONSTRUCTS_FROM_TEMPORARY, METAFN_KIND_BOOL_TINFO_TINFO,}, -#line 558 "metafns.gperf" +#line 566 "metafns.gperf" {"return_type_of", METAFN_RETURN_TYPE_OF, METAFN_KIND_INFO_INFO,}, -#line 678 "metafns.gperf" +#line 686 "metafns.gperf" {"add_lvalue_reference", METAFN_ADD_LVALUE_REFERENCE, METAFN_KIND_INFO_TINFO,}, -#line 477 "metafns.gperf" +#line 485 "metafns.gperf" {"constant_of", METAFN_CONSTANT_OF, METAFN_KIND_INFO_INFO,}, -#line 673 "metafns.gperf" +#line 681 "metafns.gperf" {"remove_cv", METAFN_REMOVE_CV, METAFN_KIND_INFO_TINFO,}, -#line 642 "metafns.gperf" +#line 650 "metafns.gperf" {"is_trivially_destructible_type", METAFN_IS_TRIVIALLY_DESTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 676 "metafns.gperf" +#line 684 "metafns.gperf" {"add_cv", METAFN_ADD_CV, METAFN_KIND_INFO_TINFO,}, -#line 617 "metafns.gperf" +#line 625 "metafns.gperf" {"is_aggregate_type", METAFN_IS_AGGREGATE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 582 "metafns.gperf" +#line 590 "metafns.gperf" {"reflect_constant_string", METAFN_REFLECT_CONSTANT_STRING, METAFN_KIND_INFO_INPUT_RANGE,}, -#line 555 "metafns.gperf" +#line 563 "metafns.gperf" {"template_arguments_of", METAFN_TEMPLATE_ARGUMENTS_OF, METAFN_KIND_VECTOR_INFO_INFO,}, -#line 570 "metafns.gperf" +#line 578 "metafns.gperf" {"subobjects_of", METAFN_SUBOBJECTS_OF, METAFN_KIND_VECTOR_INFO_INFO_ACCESS_CONTEXT,}, -#line 572 "metafns.gperf" +#line 580 "metafns.gperf" {"offset_of", METAFN_OFFSET_OF, METAFN_KIND_MEMBER_OFFSET_INFO,}, -#line 636 "metafns.gperf" +#line 644 "metafns.gperf" {"is_trivially_default_constructible_type", METAFN_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 677 "metafns.gperf" +#line 685 "metafns.gperf" {"remove_reference", METAFN_REMOVE_REFERENCE, METAFN_KIND_INFO_TINFO,}, -#line 535 "metafns.gperf" +#line 543 "metafns.gperf" {"is_alias_template", METAFN_IS_ALIAS_TEMPLATE, METAFN_KIND_BOOL_INFO,}, -#line 681 "metafns.gperf" +#line 689 "metafns.gperf" {"make_unsigned", METAFN_MAKE_UNSIGNED, METAFN_KIND_INFO_TINFO,}, -#line 667 "metafns.gperf" +#line 675 "metafns.gperf" {"is_invocable_type", METAFN_IS_INVOCABLE_TYPE, METAFN_KIND_BOOL_TINFO_REFLECTION_RANGET,}, -#line 624 "metafns.gperf" +#line 632 "metafns.gperf" {"is_scoped_enum_type", METAFN_IS_SCOPED_ENUM_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 547 "metafns.gperf" +#line 555 "metafns.gperf" {"is_static_member", METAFN_IS_STATIC_MEMBER, METAFN_KIND_BOOL_INFO,}, -#line 674 "metafns.gperf" +#line 682 "metafns.gperf" {"add_const", METAFN_ADD_CONST, METAFN_KIND_INFO_TINFO,}, -#line 634 "metafns.gperf" +#line 642 "metafns.gperf" {"is_destructible_type", METAFN_IS_DESTRUCTIBLE_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 599 "metafns.gperf" +#line 607 "metafns.gperf" {"is_class_type", METAFN_IS_CLASS_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 682 "metafns.gperf" +#line 690 "metafns.gperf" {"remove_extent", METAFN_REMOVE_EXTENT, METAFN_KIND_INFO_TINFO,}, -#line 668 "metafns.gperf" +#line 676 "metafns.gperf" {"is_invocable_r_type", METAFN_IS_INVOCABLE_R_TYPE, METAFN_KIND_BOOL_TINFO_TINFO_REFLECTION_RANGET,}, -#line 559 "metafns.gperf" +#line 567 "metafns.gperf" {"is_accessible", METAFN_IS_ACCESSIBLE, METAFN_KIND_BOOL_INFO_ACCESS_CONTEXT,}, -#line 466 "metafns.gperf" +#line 474 "metafns.gperf" {"operator_of", METAFN_OPERATOR_OF, METAFN_KIND_OPERATORS_INFO,}, -#line 591 "metafns.gperf" +#line 599 "metafns.gperf" {"is_array_type", METAFN_IS_ARRAY_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 671 "metafns.gperf" +#line 679 "metafns.gperf" {"remove_const", METAFN_REMOVE_CONST, METAFN_KIND_INFO_TINFO,}, -#line 498 "metafns.gperf" +#line 506 "metafns.gperf" {"is_rvalue_reference_qualified", METAFN_IS_RVALUE_REFERENCE_QUALIFIED, METAFN_KIND_BOOL_INFO,}, -#line 499 "metafns.gperf" +#line 507 "metafns.gperf" {"has_static_storage_duration", METAFN_HAS_STATIC_STORAGE_DURATION, METAFN_KIND_BOOL_INFO,}, -#line 683 "metafns.gperf" +#line 691 "metafns.gperf" {"remove_all_extents", METAFN_REMOVE_ALL_EXTENTS, METAFN_KIND_INFO_TINFO,}, -#line 504 "metafns.gperf" +#line 512 "metafns.gperf" {"has_external_linkage", METAFN_HAS_EXTERNAL_LINKAGE, METAFN_KIND_BOOL_INFO,}, -#line 686 "metafns.gperf" +#line 694 "metafns.gperf" {"remove_cvref", METAFN_REMOVE_CVREF, METAFN_KIND_INFO_TINFO,}, -#line 493 "metafns.gperf" +#line 501 "metafns.gperf" {"is_annotation", METAFN_IS_ANNOTATION, METAFN_KIND_BOOL_INFO,}, -#line 684 "metafns.gperf" +#line 692 "metafns.gperf" {"remove_pointer", METAFN_REMOVE_POINTER, METAFN_KIND_INFO_TINFO,}, -#line 497 "metafns.gperf" +#line 505 "metafns.gperf" {"is_lvalue_reference_qualified", METAFN_IS_LVALUE_REFERENCE_QUALIFIED, METAFN_KIND_BOOL_INFO,}, -#line 662 "metafns.gperf" +#line 670 "metafns.gperf" {"is_virtual_base_of_type", METAFN_IS_VIRTUAL_BASE_OF_TYPE, METAFN_KIND_BOOL_TINFO_TINFO,}, -#line 585 "metafns.gperf" +#line 593 "metafns.gperf" {"is_data_member_spec", METAFN_IS_DATA_MEMBER_SPEC, METAFN_KIND_BOOL_INFO,}, -#line 620 "metafns.gperf" +#line 628 "metafns.gperf" {"is_signed_type", METAFN_IS_SIGNED_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 615 "metafns.gperf" +#line 623 "metafns.gperf" {"is_abstract_type", METAFN_IS_ABSTRACT_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 481 "metafns.gperf" +#line 489 "metafns.gperf" {"is_virtual", METAFN_IS_VIRTUAL, METAFN_KIND_BOOL_INFO,}, -#line 472 "metafns.gperf" +#line 480 "metafns.gperf" {"display_string_of", METAFN_DISPLAY_STRING_OF, METAFN_KIND_STRING_VIEW_INFO,}, -#line 595 "metafns.gperf" +#line 603 "metafns.gperf" {"is_member_object_pointer_type", METAFN_IS_MEMBER_OBJECT_POINTER_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 693 "metafns.gperf" +#line 701 "metafns.gperf" {"unwrap_ref_decay", METAFN_UNWRAP_REF_DECAY, METAFN_KIND_INFO_TINFO,}, -#line 618 "metafns.gperf" +#line 626 "metafns.gperf" {"is_consteval_only_type", METAFN_IS_CONSTEVAL_ONLY_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 607 "metafns.gperf" +#line 615 "metafns.gperf" {"is_compound_type", METAFN_IS_COMPOUND_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 468 "metafns.gperf" +#line 476 "metafns.gperf" {"u8symbol_of", METAFN_U8SYMBOL_OF, METAFN_KIND_U8STRING_VIEW_OPERATORS,}, -#line 485 "metafns.gperf" +#line 493 "metafns.gperf" {"is_deleted", METAFN_IS_DELETED, METAFN_KIND_BOOL_INFO,}, -#line 590 "metafns.gperf" +#line 598 "metafns.gperf" {"is_floating_point_type", METAFN_IS_FLOATING_POINT_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 538 "metafns.gperf" +#line 546 "metafns.gperf" {"is_literal_operator_template", METAFN_IS_LITERAL_OPERATOR_TEMPLATE, METAFN_KIND_BOOL_INFO,}, -#line 486 "metafns.gperf" +#line 494 "metafns.gperf" {"is_defaulted", METAFN_IS_DEFAULTED, METAFN_KIND_BOOL_INFO,}, -#line 584 "metafns.gperf" +#line 592 "metafns.gperf" {"data_member_spec", METAFN_DATA_MEMBER_SPEC, METAFN_KIND_INFO_TINFO_DATA_MEMBER_OPTIONS,}, -#line 476 "metafns.gperf" +#line 484 "metafns.gperf" {"object_of", METAFN_OBJECT_OF, METAFN_KIND_INFO_INFO,}, -#line 702 "metafns.gperf" +#line 710 "metafns.gperf" {"_S_exception_cvt_to_utf8", METAFN_EXCEPTION__S_EXCEPTION_CVT_TO_UTF8, METAFN_KIND_U8STRING_VIEW_INPUT_RANGE,}, -#line 703 "metafns.gperf" +#line 711 "metafns.gperf" {"_S_exception_cvt_from_utf8", METAFN_EXCEPTION__S_EXCEPTION_CVT_FROM_UTF8, METAFN_KIND_STRING_VIEW_INPUT_RANGE,}, -#line 484 "metafns.gperf" +#line 492 "metafns.gperf" {"is_final", METAFN_IS_FINAL, METAFN_KIND_BOOL_INFO,}, -#line 517 "metafns.gperf" +#line 525 "metafns.gperf" {"is_literal_operator", METAFN_IS_LITERAL_OPERATOR, METAFN_KIND_BOOL_INFO,}, -#line 488 "metafns.gperf" +#line 496 "metafns.gperf" {"is_user_declared", METAFN_IS_USER_DECLARED, METAFN_KIND_BOOL_INFO,}, -#line 553 "metafns.gperf" +#line 561 "metafns.gperf" {"has_template_arguments", METAFN_HAS_TEMPLATE_ARGUMENTS, METAFN_KIND_BOOL_INFO,}, -#line 516 "metafns.gperf" +#line 524 "metafns.gperf" {"is_operator_function", METAFN_IS_OPERATOR_FUNCTION, METAFN_KIND_BOOL_INFO,}, -#line 691 "metafns.gperf" +#line 699 "metafns.gperf" {"invoke_result", METAFN_INVOKE_RESULT, METAFN_KIND_INFO_TINFO_REFLECTION_RANGET,}, -#line 583 "metafns.gperf" +#line 591 "metafns.gperf" {"reflect_constant_array", METAFN_REFLECT_CONSTANT_ARRAY, METAFN_KIND_INFO_INPUT_RANGE,}, -#line 505 "metafns.gperf" +#line 513 "metafns.gperf" {"has_c_language_linkage", METAFN_HAS_C_LANGUAGE_LINKAGE, METAFN_KIND_BOOL_INFO,}, -#line 537 "metafns.gperf" +#line 545 "metafns.gperf" {"is_operator_function_template", METAFN_IS_OPERATOR_FUNCTION_TEMPLATE, METAFN_KIND_BOOL_INFO,}, -#line 589 "metafns.gperf" +#line 597 "metafns.gperf" {"is_integral_type", METAFN_IS_INTEGRAL_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 655 "metafns.gperf" +#line 663 "metafns.gperf" {"has_unique_object_representations", METAFN_HAS_UNIQUE_OBJECT_REPRESENTATIONS, METAFN_KIND_BOOL_TINFO,}, -#line 500 "metafns.gperf" +#line 508 "metafns.gperf" {"has_thread_storage_duration", METAFN_HAS_THREAD_STORAGE_DURATION, METAFN_KIND_BOOL_INFO,}, -#line 561 "metafns.gperf" +#line 569 "metafns.gperf" {"has_inaccessible_bases", METAFN_HAS_INACCESSIBLE_BASES, METAFN_KIND_BOOL_INFO_ACCESS_CONTEXT,}, -#line 562 "metafns.gperf" +#line 570 "metafns.gperf" {"has_inaccessible_subobjects", METAFN_HAS_INACCESSIBLE_SUBOBJECTS, METAFN_KIND_BOOL_INFO_ACCESS_CONTEXT,}, -#line 680 "metafns.gperf" +#line 688 "metafns.gperf" {"make_signed", METAFN_MAKE_SIGNED, METAFN_KIND_INFO_TINFO,}, -#line 560 "metafns.gperf" +#line 568 "metafns.gperf" {"has_inaccessible_nonstatic_data_members", METAFN_HAS_INACCESSIBLE_NONSTATIC_DATA_MEMBERS, METAFN_KIND_BOOL_INFO_ACCESS_CONTEXT,}, -#line 672 "metafns.gperf" +#line 680 "metafns.gperf" {"remove_volatile", METAFN_REMOVE_VOLATILE, METAFN_KIND_INFO_TINFO,}, -#line 580 "metafns.gperf" +#line 588 "metafns.gperf" {"reflect_object", METAFN_REFLECT_OBJECT, METAFN_KIND_INFO_TEMPLATE_PARM_REF,}, -#line 612 "metafns.gperf" +#line 620 "metafns.gperf" {"is_standard_layout_type", METAFN_IS_STANDARD_LAYOUT_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 687 "metafns.gperf" +#line 695 "metafns.gperf" {"decay", METAFN_DECAY, METAFN_KIND_INFO_TINFO,}, -#line 623 "metafns.gperf" +#line 631 "metafns.gperf" {"is_unbounded_array_type", METAFN_IS_UNBOUNDED_ARRAY_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 569 "metafns.gperf" +#line 577 "metafns.gperf" {"nonstatic_data_members_of", METAFN_NONSTATIC_DATA_MEMBERS_OF, METAFN_KIND_VECTOR_INFO_INFO_ACCESS_CONTEXT,}, -#line 598 "metafns.gperf" +#line 606 "metafns.gperf" {"is_union_type", METAFN_IS_UNION_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 469 "metafns.gperf" +#line 477 "metafns.gperf" {"has_identifier", METAFN_HAS_IDENTIFIER, METAFN_KIND_BOOL_INFO,}, -#line 568 "metafns.gperf" +#line 576 "metafns.gperf" {"static_data_members_of", METAFN_STATIC_DATA_MEMBERS_OF, METAFN_KIND_VECTOR_INFO_INFO_ACCESS_CONTEXT,}, -#line 616 "metafns.gperf" +#line 624 "metafns.gperf" {"is_final_type", METAFN_IS_FINAL_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 552 "metafns.gperf" +#line 560 "metafns.gperf" {"dealias", METAFN_DEALIAS, METAFN_KIND_INFO_INFO,}, -#line 700 "metafns.gperf" +#line 708 "metafns.gperf" {"annotations_of_with_type", METAFN_ANNOTATIONS_OF_WITH_TYPE, METAFN_KIND_VECTOR_INFO_INFO_INFO,}, -#line 586 "metafns.gperf" +#line 594 "metafns.gperf" {"define_aggregate", METAFN_DEFINE_AGGREGATE, METAFN_KIND_INFO_INFO_REFLECTION_RANGE,}, -#line 491 "metafns.gperf" +#line 499 "metafns.gperf" {"is_bit_field", METAFN_IS_BIT_FIELD, METAFN_KIND_BOOL_INFO,}, -#line 699 "metafns.gperf" +#line 707 "metafns.gperf" {"annotations_of", METAFN_ANNOTATIONS_OF, METAFN_KIND_VECTOR_INFO_INFO,}, -#line 474 "metafns.gperf" +#line 482 "metafns.gperf" {"source_location_of", METAFN_SOURCE_LOCATION_OF, METAFN_KIND_SOURCE_LOCATION_INFO,}, -#line 574 "metafns.gperf" +#line 582 "metafns.gperf" {"alignment_of", METAFN_ALIGNMENT_OF, METAFN_KIND_SIZE_T_INFO,}, -#line 502 "metafns.gperf" +#line 510 "metafns.gperf" {"has_internal_linkage", METAFN_HAS_INTERNAL_LINKAGE, METAFN_KIND_BOOL_INFO,}, -#line 471 "metafns.gperf" +#line 479 "metafns.gperf" {"u8identifier_of", METAFN_U8IDENTIFIER_OF, METAFN_KIND_U8STRING_VIEW_INFO,}, -#line 621 "metafns.gperf" +#line 629 "metafns.gperf" {"is_unsigned_type", METAFN_IS_UNSIGNED_TYPE, METAFN_KIND_BOOL_TINFO,}, -#line 487 "metafns.gperf" +#line 495 "metafns.gperf" {"is_user_provided", METAFN_IS_USER_PROVIDED, METAFN_KIND_BOOL_INFO,} }; #if (defined __GNUC__ && __GNUC__ + (__GNUC_MINOR__ >= 6) > 4) || (defined __clang__ && __clang_major__ >= 3) diff --git a/gcc/cp/reflect.cc b/gcc/cp/reflect.cc index df7f0b54b5b5..d2bcf26ca814 100644 --- a/gcc/cp/reflect.cc +++ b/gcc/cp/reflect.cc @@ -308,6 +308,22 @@ decl_in_std_meta_p (tree decl) return decl_namespace_context (decl) == std_meta_node; } +/* True if CTX is an instance of std::meta::NAME class. */ + +static bool +is_std_meta_class (tree ctx, const char *name) +{ + if (ctx == NULL_TREE || !CLASS_TYPE_P (ctx) || !TYPE_MAIN_DECL (ctx)) + return false; + + tree decl = TYPE_MAIN_DECL (ctx); + tree dname = DECL_NAME (decl); + if (dname == NULL_TREE || !id_equal (dname, name)) + return false; + + return decl_in_std_meta_p (decl); +} + /* Returns true if FNDECL, a FUNCTION_DECL, is a call to a metafunction declared in namespace std::meta. */ @@ -340,12 +356,18 @@ metafunction_p (tree fndecl) /* Extract the N-th reflection argument from a metafunction call CALL. */ static tree -get_info (const constexpr_ctx *ctx, tree call, int n, bool *non_constant_p, - bool *overflow_p, tree *jump_target) +get_info (location_t loc, const constexpr_ctx *ctx, tree call, int n, + bool *non_constant_p, bool *overflow_p, tree *jump_target) { gcc_checking_assert (call_expr_nargs (call) > n); tree info = get_nth_callarg (call, n); - gcc_checking_assert (REFLECTION_TYPE_P (TREE_TYPE (info))); + if (!REFLECTION_TYPE_P (TREE_TYPE (info))) + { + error_at (loc, "incorrect %qT type of argument %d, expected %qT", + TREE_TYPE (info), n + 1, meta_info_type_node); + *non_constant_p = true; + return NULL_TREE; + } info = cxx_eval_constant_expression (ctx, info, vc_prvalue, non_constant_p, overflow_p, jump_target); @@ -7546,6 +7568,146 @@ eval_extract (location_t loc, const constexpr_ctx *ctx, tree type, tree r, } } +/* Diagnose incorrect type of metafn argument and return true in that + case. */ + +static bool +check_metafn_arg_type (location_t loc, metafn_kind_arg kind, int n, tree type, + bool *non_constant_p) +{ + tree expected = NULL_TREE; + const char *expected_str = NULL; + switch ((metafn_kind_arg) kind) + { + case METAFN_KIND_ARG_VOID: + break; + case METAFN_KIND_ARG_INFO: + case METAFN_KIND_ARG_TINFO: + if (!REFLECTION_TYPE_P (type)) + expected = meta_info_type_node; + break; + case METAFN_KIND_ARG_REFLECTION_RANGE: + case METAFN_KIND_ARG_REFLECTION_RANGET: + case METAFN_KIND_ARG_INPUT_RANGE: + break; + case METAFN_KIND_ARG_SIZE_T: + if (!same_type_ignoring_top_level_qualifiers_p (type, size_type_node)) + expected_str = "std::size_t"; + break; + case METAFN_KIND_ARG_UNSIGNED: + if (!same_type_ignoring_top_level_qualifiers_p (type, + unsigned_type_node)) + expected = unsigned_type_node; + break; + case METAFN_KIND_ARG_OPERATORS: + if (TREE_CODE (type) != ENUMERAL_TYPE + || TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node) + || TYPE_CONTEXT (type) != std_meta_node) + expected_str = "std::meta::operators"; + break; + case METAFN_KIND_ARG_ACCESS_CONTEXT: + if (TYPE_REF_P (type)) + type = TREE_TYPE (type); + if (!is_std_meta_class (type, "access_context")) + expected_str = "std::meta::access_context"; + break; + case METAFN_KIND_ARG_DATA_MEMBER_OPTIONS: + if (TYPE_REF_P (type)) + type = TREE_TYPE (type); + if (!is_std_meta_class (type, "data_member_options")) + expected_str = "std::meta::data_member_options"; + break; + case METAFN_KIND_ARG_TEMPLATE_PARM: + case METAFN_KIND_ARG_TEMPLATE_PARM_REF: + break; + } + if (expected || expected_str) + { + if (expected_str) + error_at (loc, "incorrect %qT type of argument %d, expected %qs", + type, n + 1, expected_str); + else + error_at (loc, "incorrect %qT type of argument %d, expected %qT", + type, n + 1, expected); + *non_constant_p = true; + return true; + } + return false; +} + +/* Diagnose incorrect return type of metafn and return true in that case. */ + +static bool +check_metafn_return_type (location_t loc, metafn_kind_ret kind, tree type, + bool *non_constant_p) +{ + tree expected = NULL_TREE; + const char *expected_str = NULL; + switch (kind) + { + case METAFN_KIND_RET_BOOL: + if (TREE_CODE (type) != BOOLEAN_TYPE) + expected = boolean_type_node; + break; + case METAFN_KIND_RET_INFO: + if (!REFLECTION_TYPE_P (type)) + expected = meta_info_type_node; + break; + case METAFN_KIND_RET_SIZE_T: + if (!same_type_ignoring_top_level_qualifiers_p (type, size_type_node)) + expected_str = "std::size_t"; + break; + case METAFN_KIND_RET_MEMBER_OFFSET: + if (!is_std_meta_class (type, "member_offset")) + expected_str = "std::meta::member_offset"; + break; + case METAFN_KIND_RET_OPERATORS: + if (TREE_CODE (type) != ENUMERAL_TYPE + || TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node) + || TYPE_CONTEXT (type) != std_meta_node) + expected_str = "std::meta::operators"; + break; + case METAFN_KIND_RET_SOURCE_LOCATION: + if (!is_std_class (type, "source_location")) + expected_str = "std::source_location"; + break; + case METAFN_KIND_RET_STRING_VIEW: + if (!CLASS_TYPE_P (type)) + expected_str = "std::string_view"; + break; + case METAFN_KIND_RET_U8STRING_VIEW: + if (!CLASS_TYPE_P (type)) + expected_str = "std::u8string_view"; + break; + case METAFN_KIND_RET_STRONG_ORDERING: + if (!is_std_class (type, "strong_ordering")) + expected_str = "std::strong_ordering"; + break; + case METAFN_KIND_RET_VECTOR_INFO: + if (!CLASS_TYPE_P (type)) + expected_str = "std::vector<std::meta::info>"; + break; + case METAFN_KIND_RET_ACCESS_CONTEXT: + if (!is_std_meta_class (type, "access_context")) + expected_str = "std::meta::access_context"; + break; + case METAFN_KIND_RET_TEMPLATE_PARM: + break; + } + if (expected || expected_str) + { + if (expected_str) + error_at (loc, "incorrect %qT return type, expected %qs", + type, expected_str); + else + error_at (loc, "incorrect %qT return type, expected %qT", + type, expected); + *non_constant_p = true; + return true; + } + return false; +} + /* Expand a call to a metafunction FUN. CALL is the CALL_EXPR. JUMP_TARGET is set if we are throwing std::meta::exception. */ @@ -7569,20 +7731,28 @@ process_metafunction (const constexpr_ctx *ctx, tree fun, tree call, tree h = NULL_TREE, h1 = NULL_TREE, hvec = NULL_TREE, expr = NULL_TREE; tree type = NULL_TREE, ht, info; reflect_kind kind = REFLECT_UNDEF; + tree rettype; + if (TREE_CODE (call) == AGGR_INIT_EXPR) + rettype = TREE_TYPE (AGGR_INIT_EXPR_SLOT (call)); + else + rettype = TREE_TYPE (call); + if (check_metafn_return_type (loc, METAFN_KIND_RET (minfo), rettype, + non_constant_p)) + return NULL_TREE; for (int argno = 0; argno < 3; ++argno) - switch (METAFN_KIND_ARG (argno)) + switch (METAFN_KIND_ARG (minfo, argno)) { case METAFN_KIND_ARG_VOID: break; case METAFN_KIND_ARG_INFO: case METAFN_KIND_ARG_TINFO: gcc_assert (argno < 2); - info = get_info (ctx, call, argno, non_constant_p, overflow_p, + info = get_info (loc, ctx, call, argno, non_constant_p, overflow_p, jump_target); if (*jump_target || *non_constant_p) return NULL_TREE; ht = REFLECT_EXPR_HANDLE (info); - if (METAFN_KIND_ARG (argno) == METAFN_KIND_ARG_TINFO + if (METAFN_KIND_ARG (minfo, argno) == METAFN_KIND_ARG_TINFO && eval_is_type (ht) != boolean_true_node) return throw_exception_nontype (loc, ctx, fun, non_constant_p, jump_target); @@ -7619,6 +7789,9 @@ process_metafunction (const constexpr_ctx *ctx, tree fun, tree call, case METAFN_KIND_ARG_OPERATORS: gcc_assert (argno == 0); expr = get_nth_callarg (call, 0); + if (check_metafn_arg_type (loc, METAFN_KIND_ARG (minfo, argno), 0, + TREE_TYPE (expr), non_constant_p)) + return NULL_TREE; expr = cxx_eval_constant_expression (ctx, expr, vc_prvalue, non_constant_p, overflow_p, jump_target); @@ -7630,6 +7803,9 @@ process_metafunction (const constexpr_ctx *ctx, tree fun, tree call, case METAFN_KIND_ARG_DATA_MEMBER_OPTIONS: gcc_assert (argno == 1); expr = get_nth_callarg (call, argno); + if (check_metafn_arg_type (loc, METAFN_KIND_ARG (minfo, argno), 1, + TREE_TYPE (expr), non_constant_p)) + return NULL_TREE; expr = cxx_eval_constant_expression (ctx, expr, vc_prvalue, non_constant_p, overflow_p, jump_target); @@ -7644,31 +7820,31 @@ process_metafunction (const constexpr_ctx *ctx, tree fun, tree call, { case METAFN_OPERATOR_OF: return eval_operator_of (loc, ctx, h, non_constant_p, jump_target, - TREE_TYPE (call), fun); + rettype, fun); case METAFN_SYMBOL_OF: return eval_symbol_of (loc, ctx, expr, non_constant_p, jump_target, - char_type_node, TREE_TYPE (call), fun); + char_type_node, rettype, fun); case METAFN_U8SYMBOL_OF: return eval_symbol_of (loc, ctx, expr, non_constant_p, jump_target, - char8_type_node, TREE_TYPE (call), fun); + char8_type_node, rettype, fun); case METAFN_HAS_IDENTIFIER: return eval_has_identifier (h, kind); case METAFN_IDENTIFIER_OF: return eval_identifier_of (loc, ctx, h, kind, non_constant_p, jump_target, - char_type_node, TREE_TYPE (call), fun); + char_type_node, rettype, fun); case METAFN_U8IDENTIFIER_OF: return eval_identifier_of (loc, ctx, h, kind, non_constant_p, jump_target, - char8_type_node, TREE_TYPE (call), fun); + char8_type_node, rettype, fun); case METAFN_DISPLAY_STRING_OF: return eval_display_string_of (loc, ctx, h, kind, non_constant_p, jump_target, char_type_node, - TREE_TYPE (call), fun); + rettype, fun); case METAFN_U8DISPLAY_STRING_OF: return eval_display_string_of (loc, ctx, h, kind, non_constant_p, jump_target, char8_type_node, - TREE_TYPE (call), fun); + rettype, fun); case METAFN_SOURCE_LOCATION_OF: - return eval_source_location_of (loc, h, kind, TREE_TYPE (call)); + return eval_source_location_of (loc, h, kind, rettype); case METAFN_TYPE_OF: return eval_type_of (loc, ctx, h, kind, non_constant_p, jump_target, fun); case METAFN_OBJECT_OF: @@ -7888,16 +8064,16 @@ process_metafunction (const constexpr_ctx *ctx, tree fun, tree call, return eval_enumerators_of (loc, ctx, h, non_constant_p, jump_target, fun); case METAFN_OFFSET_OF: - return eval_offset_of (loc, ctx, h, kind, TREE_TYPE (call), + return eval_offset_of (loc, ctx, h, kind, rettype, non_constant_p, jump_target, fun); case METAFN_SIZE_OF: - return eval_size_of (loc, ctx, h, kind, TREE_TYPE (call), non_constant_p, + return eval_size_of (loc, ctx, h, kind, rettype, non_constant_p, jump_target, fun); case METAFN_ALIGNMENT_OF: - return eval_alignment_of (loc, ctx, h, kind, TREE_TYPE (call), + return eval_alignment_of (loc, ctx, h, kind, rettype, non_constant_p, jump_target, fun); case METAFN_BIT_SIZE_OF: - return eval_bit_size_of (loc, ctx, h, kind, TREE_TYPE (call), + return eval_bit_size_of (loc, ctx, h, kind, rettype, non_constant_p, jump_target, fun); case METAFN_EXTRACT: { diff --git a/gcc/testsuite/g++.dg/reflect/pr124689.C b/gcc/testsuite/g++.dg/reflect/pr124689.C new file mode 100644 index 000000000000..e4093d894fef --- /dev/null +++ b/gcc/testsuite/g++.dg/reflect/pr124689.C @@ -0,0 +1,58 @@ +// PR c++/124689 +// { dg-do compile { target c++26 } } +// { dg-additional-options "-freflection" } +// Test error recovery from bogus <meta> replacement. + +namespace std { + using size_t = decltype (sizeof 0); + struct string_view {}; + namespace meta { + using info = decltype(^^::); + consteval int is_enumerator (info); + consteval void type_of (info); + consteval char size_of (info); + consteval int offset_of (info); + consteval float operator_of (info); + consteval int *source_location_of (info); + consteval bool identifier_of (info); + consteval void u8identifier_of (info); + consteval int type_order (info, info); + consteval double enumerators_of (info); + struct access_context { + static consteval short current (); + }; + consteval bool is_bit_field (int); + consteval bool is_void_type (double); + consteval info tuple_element (long int, info); + consteval size_t extent (info, info); + consteval string_view symbol_of (int); + consteval info members_of (info, int); + consteval info data_member_spec (info, float); + } +} + +int a; +constexpr auto b = is_enumerator (^^::); // { dg-error "incorrect 'int' return type, expected 'bool'" } +consteval { + type_of (^^a); // { dg-error "incorrect 'void' return type, expected 'std::meta::info'" } +} +struct S { int a; S &operator [] (const S &); }; +constexpr auto c = size_of (^^a); // { dg-error "incorrect 'char' return type, expected 'std::size_t'" } +constexpr auto d = offset_of (^^S::a); // { dg-error "incorrect 'int' return type, expected 'std::meta::member_offset'" } +constexpr auto e = operator_of (^^S::operator []); // { dg-error "incorrect 'float' return type, expected 'std::meta::operators'" } +constexpr auto f = source_location_of (^^a); // { dg-error "incorrect 'int\\\*' return type, expected 'std::source_location'" } +constexpr auto g = identifier_of (^^a); // { dg-error "incorrect 'bool' return type, expected 'std::string_view'" } +consteval { + u8identifier_of (^^a); // { dg-error "incorrect 'void' return type, expected 'std::u8string_view'" } +} +constexpr auto i = type_order (^^int, ^^int); // { dg-error "incorrect 'int' return type, expected 'std::strong_ordering'" } +enum E { E1 }; +constexpr auto j = enumerators_of (^^E); // { dg-error "incorrect 'double' return type, expected 'std::vector<std::meta::info>'" } +constexpr auto k = std::meta::access_context::current (); // { dg-error "incorrect 'short int' return type, expected 'std::meta::access_context'" } +constexpr auto l = std::meta::is_bit_field (0); // { dg-error "incorrect 'int' type of argument 1, expected 'std::meta::info'" } +constexpr auto m = std::meta::is_void_type (0.0); // { dg-error "incorrect 'double' type of argument 1, expected 'std::meta::info'" } +constexpr auto n = std::meta::tuple_element (0, ^^::); // { dg-error "incorrect 'long int' type of argument 1, expected 'std::size_t'" } +constexpr auto o = extent (^^int, ^^int); // { dg-error "incorrect 'std::meta::info' type of argument 2, expected 'unsigned int'" } +constexpr auto p = std::meta::symbol_of (0); // { dg-error "incorrect 'int' type of argument 1, expected 'std::meta::operators'" } +constexpr auto q = members_of (^^S, 0); // { dg-error "incorrect 'std::meta::info' return type, expected 'std::vector<std::meta::info>'" } +constexpr auto r = data_member_spec (^^S, 0.0f); // { dg-error "incorrect 'float' type of argument 2, expected 'std::meta::data_member_options'" }
