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
102
103
104
105
106
107
108
109
110
111
112
113
114
|
co_yield { move( uniCall ), ovl, uc };
}
}
}
}
}
}
bool empathy::builtins::IsOverloadSet( const Value& os )
{
return os.type() == GetValueType< ptr< OverloadSet > >();
}
namespace empathy::ir
{
const Term& Bridge< ptr< builtins::OverloadSet > >::Type()
{
static auto type = ValueToIRExpr( Value( TypeType(), TSID( overloadset ) ) );
return type;
}
Value Bridge< ptr< builtins::OverloadSet > >::ToValue( const ptr< builtins::OverloadSet >& os )
{
return Value( Type(), TERM( static_pointer_cast< void >( os ) ) );
}
optional< ptr< builtins::OverloadSet > > Bridge< ptr< builtins::OverloadSet > >::FromValue( const Value& v )
{
if( !IsOverloadSet( v ) )
return nullopt;
auto result = Decompose( v.val(),
Val< ptr< void > >()
);
if( !result )
return nullopt;
return static_pointer_cast< builtins::OverloadSet >( result->get() );
}
}
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
74
75
76
77
78
79
80
|
co_yield { move( uniCall ), ovl, uc };
}
}
}
}
}
}
|