Can we get rid of opApply?
Max Samukha
samukha at voliacable.com.removethis
Tue Jan 20 23:41:41 PST 2009
On Wed, 21 Jan 2009 09:35:19 +0200, Max Samukha
<samukha at voliacable.com.removethis> wrote:
>On Tue, 20 Jan 2009 12:30:27 -0500, "Jarrett Billingsley"
><jarrett.billingsley at gmail.com> wrote:
>
>>On Tue, Jan 20, 2009 at 12:21 PM, Max Samukha
>><samukha at voliacable.com.removethis> wrote:
>>>
>>> BTW, is there a way to alias a function template instantiation?
>>>
>>
>>A full instantiation can be.
>>
>>alias Foo!(Bar, Baz) FooBarBaz;
>>
>>A partial instantiation can't be, but you can do it using a proxy template.
>>
>>template FooBar(U)
>>{
>> alias Foo!(Bar, U) FooBar;
>>}
>
>Thanks. My confusion came from 'to' being declared as
>
>template to(Source)
>{
> Target to(Target)(Target t);
>}
template to(Target)
{
Target to(Source)(Source value)
{
}
}
>
>instead of
>
>Target to(Source, Target)(Target t)
>{
>}
Target to(Target, Source)(Source t)
{
}
More information about the Digitalmars-d
mailing list