ChainImpl save method

Andrej Mitrovic andrej.mitrovich at gmail.com
Wed Dec 29 14:35:05 PST 2010


One more question. What does this do?

static RvalueElementType fixRef(RvalueElementType val)
{
    return val;
}

This looks like a workaround for something but I can't figure out why
the function is static and why does it just return the value passed
in?

On 12/29/10, spir <denis.spir at gmail.com> wrote:
> On Wed, 29 Dec 2010 15:35:31 -0500
> "Steven Schveighoffer" <schveiguy at yahoo.com> wrote:
>
>> Yes.  Inside a template, the name of the template is synonymous with the
>> template instance being instantiated.
>>
>> So for example:
>>
>> struct S(T)
>> {
>>     void foo(){ S s; // this is of type S!T
>>     }
>> }
>
> Good to know ;-) I write specialised types everywhere in template, like
>
> struct S(T) {
>     S!T aNewSBangT (S!T anotherSBangT) {...}
> }
>
> Denis
> -- -- -- -- -- -- --
> vit esse estrany ☣
>
> spir.wikidot.com
>
>


More information about the Digitalmars-d-learn mailing list