Need help understanding Tuple
d coder
dlang.coder at gmail.com
Tue Dec 18 04:57:17 PST 2012
> As first step, don't use that Tuple, use std.typetuple.TypeTuple instead.
> It's the same, but using the standardized name helps readability.
>
Thanks for the correction. Tuple is indeed confusing with
std.typecons.Tuple which is a struct tuple.
So here is the code again.
enum Bar;
class Foo {
@Bar int a;
}
void main()
{
import std.typetuple;
Foo foo = new Foo;
alias TypeTuple!(__traits(getAttributes, foo.a)) tp;
pragma(msg, tp);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20121218/0ca1bec9/attachment.html>
More information about the Digitalmars-d-learn
mailing list