62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
-
+
-
+
-
+
|
{
auto pOvlSet = GetOrCreateOverloadSet( e, funcName );
( ( ruleBuilders( e, pOvlSet, tag() ) ), ... );
return [pOvlSet, funcName]< typename... O >( Parser& p, O&&... operands )
{
DiagnosticsContext dc( 0, format( "When invoking {}.", funcName ) );
return InvokeOverloadSet( p.resolver()->context(), pOvlSet, MakeTuple( operands... ) );
return InvokeOverloadSet( p.context(), pOvlSet, MakeTuple( operands... ) );
};
}
template< typename T, typename I, typename RT = T >
auto ForType()
{
return []< typename tag >( auto&& e, auto&& pOvlSet, tag t )
{
using intrinsicType = Intrinsic< Value ( T, T ) >;
auto intrinsicFunc = []( const Value& lhs, const Value& rhs )
auto intrinsicFunc = []( const Context& c, const Value& lhs, const Value& rhs )
{
return BuildComputedValue( GetValueType< RT >(), I( lhs, rhs ) );
};
pOvlSet->add( e, ToValue< intrinsicType >( move( intrinsicFunc ) ), GetFuncInvocationRule() );
};
}
template< typename T, typename I, typename RT = T >
auto ForVerificationType()
{
return []< typename tag >( auto&& e, auto&& pOvlSet, tag t )
{
using intrinsicType = VerificationIntrinsic< Value ( T, T ) >;
auto intrinsicFunc = []( const Value& lhs, const Value& rhs )
auto intrinsicFunc = []( const Context& c, const Value& lhs, const Value& rhs )
{
return BuildComputedValue( GetValueType< RT >(), I( lhs, rhs ) );
};
pOvlSet->add( e, ToValue< intrinsicType >( move( intrinsicFunc ) ), GetFuncInvocationRule() );
};
}
|