http://d.puremagic.com/issues/show_bug.cgi?id=10803
--- Comment #4 from Kenji Hara <[email protected]> 2013-08-12 08:53:04 PDT --- (In reply to comment #3) > Proof-link to the docs? And what is exact meaning of it (what is type of of > enum)? D has "tuple of variables", and today it is accepted in statement scope and aggregate fields. import std.typetuple; void test1() { auto tup1 = TypeTuple!(1, "a"); pragma(msg, typeof(tup1)); // (int, string) assert(tup1[0] == 1); assert(tup1[1] == "a"); tup1[0] = 2; tup1[1] = "b"; assert(tup1[0] == 2); assert(tup1[1] == "b"); enum tup2 = TypeTuple!(1, "a"); pragma(msg, typeof(tup2)); // (int, string) assert(tup2[0] == 1); assert(tup2[1] == "a"); } struct Tuple(TL...) { TL tup3; } alias ConcreteTuple = Tuple!(int, string); // BUG: should be accepted as same as tup1 to 3 //auto tup4 = TypeTuple!(1, "a"); //enum tup5 = TypeTuple!(1, "a"); I think that should also be accepted in module scope. If this is legal, why this: > > auto foo() > { > return TypeTuple!("aaa", "bbb"); > } > > is not? That's completely irrelevant thing. D's built-in tuple is not packed, and D ABI does not support "multiple value return from function". -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
