Return types of the methods of a struct
Quentin Ladeveze via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Jun 19 09:16:20 PDT 2015
On Friday, 19 June 2015 at 15:36:54 UTC, Justin Whear wrote:
> On Fri, 19 Jun 2015 13:27:13 +0000, Quentin Ladeveze wrote:
>>
>> Is there any way to have a asTuple method in this struct that
>> would returns something like :
>>
>> Tuple!(int, "a", float, "b", string, "c")
>>
>> and that will contain the values of the methods of the struct ?
>>
>> Thanks.
>
> You'll want to work your way through this example carefully as
> it's
> basically template-based functional programming, but I think
> does what
> you want:
> http://dpaste.dzfl.pl/b048ea3adb93
This is interesting, thank you very much ! I will try to figure
out how it works now
More information about the Digitalmars-d-learn
mailing list