File tree Expand file tree Collapse file tree 5 files changed +122
-63
lines changed Expand file tree Collapse file tree 5 files changed +122
-63
lines changed Original file line number Diff line number Diff line change @@ -2244,6 +2244,9 @@ struct function_type_node
22442244 auto is_metafunction () const
22452245 -> bool;
22462246
2247+ auto is_const_metafunction () const
2248+ -> bool;
2249+
22472250 auto has_declared_return_type () const
22482251 -> bool
22492252 {
@@ -3508,6 +3511,16 @@ struct declaration_node
35083511 return false ;
35093512 }
35103513
3514+ auto is_const_metafunction () const
3515+ -> bool
3516+ {
3517+ if (auto func = std::get_if<a_function>(&type)) {
3518+ return (*func)->is_const_metafunction ();
3519+ }
3520+ // else
3521+ return false ;
3522+ }
3523+
35113524 auto is_binary_comparison_function () const
35123525 -> bool
35133526 {
@@ -3975,7 +3988,10 @@ auto function_type_node::is_metafunction() const
39753988 if (
39763989 (*parameters).ssize () == 1
39773990 && this ->nth_parameter_type_name (1 ) == " cpp2::meta::type_declaration"
3978- && (*parameters)[0 ]->direction () == passing_style::inout
3991+ && (
3992+ (*parameters)[0 ]->direction () == passing_style::in
3993+ || (*parameters)[0 ]->direction () == passing_style::inout
3994+ )
39793995 )
39803996 {
39813997 return true ;
@@ -3984,6 +4000,14 @@ auto function_type_node::is_metafunction() const
39844000}
39854001
39864002
4003+ auto function_type_node::is_const_metafunction () const
4004+ -> bool
4005+ {
4006+ return is_metafunction ()
4007+ && (*parameters)[0 ]->direction () == passing_style::in;
4008+ }
4009+
4010+
39874011auto primary_expression_node::template_arguments () const
39884012 -> std::vector<template_argument> const &
39894013{
You can’t perform that action at this time.
0 commit comments