30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
-
+
-
+
|
{
auto v = make_shared< Vector >();
v->reserve( VecSize( tft.params() ) + 1 );
auto rtSig = BuildTemplateSignature( c, tft.returnType() );
if( !rtSig )
{
DiagnosticsManager::GetInstance().emitErrorMessage( ValueFromEIR( tft.returnType() )->locationId(),
DiagnosticsManager::GetInstance().emitErrorMessage( EIRToValue( tft.returnType() )->locationId(),
"Invalid template return type or texpr." );
return nullopt;
}
v->append( move( *rtSig ) );
bool success = true;
ForEachInVectorTerm( tft.params(), [&]( auto&& param )
{
auto teSig = BuildTemplateSignature( c, param );
if( !teSig )
{
DiagnosticsManager::GetInstance().emitErrorMessage( ValueFromEIR( param )->locationId(),
DiagnosticsManager::GetInstance().emitErrorMessage( EIRToValue( param )->locationId(),
"Invalid template parameter." );
success = false;
return false;
}
v->append( move( *teSig ) );
return true;
|
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
-
+
-
+
|
auto apv = make_shared< Vector >();
apv->reserve( VecSize( ftype->params() ) + 1 );
auto rtArgPat = BuildTemplateArgPattern( c, ftype->returnType() );
if( !rtArgPat )
{
DiagnosticsManager::GetInstance().emitErrorMessage( ValueFromEIR( ftype->returnType() )->locationId(),
DiagnosticsManager::GetInstance().emitErrorMessage( EIRToValue( ftype->returnType() )->locationId(),
"Invalid template return type or texpr." );
return nullopt;
}
apv->append( move( *rtArgPat ) );
bool success = true;
ForEachInVectorTerm( ftype->params(), [&]( auto&& param )
{
auto teArgPat = BuildTemplateArgPattern( c, param );
if( !teArgPat )
{
DiagnosticsManager::GetInstance().emitErrorMessage( ValueFromEIR( param )->locationId(),
DiagnosticsManager::GetInstance().emitErrorMessage( EIRToValue( param )->locationId(),
"Invalid template parameter." );
success = false;
return false;
}
apv->append( move( *teArgPat ) );
return true;
|