|
Archives
D Programming
digitalmars.Ddigitalmars.D.bugs digitalmars.D.dtl digitalmars.D.ide digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger D.gnu D C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
digitalmars.D.bugs - [Issue 3092] New: Indexing a tuple produces a tuple containing the indexed element
http://d.puremagic.com/issues/show_bug.cgi?id=3092 Summary: Indexing a tuple produces a tuple containing the indexed element Product: D Version: 1.045 Platform: Other OS/Version: Windows Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: samukha voliacable.com template Foo(A...) { alias A[0] Foo; } void foo() { } static assert(is(Foo!(int, foo) == int)); void main() { } Error: static assert (is((int) == int)) is false ---- This one was slightly annoying as it came along with http://d.puremagic.com/issues/show_bug.cgi?id=2229, which gets in the way regularly and which is almost a year old now. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- Jun 25 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3092 --- Comment #1 from Max Samukha <samukha voliacable.com> 2009-06-25 02:02:47 PDT --- A workaround (which doesn't mean that the bug is not critical): template StaticTuple(A...) { alias A StaticTuple; } template Foo(A...) { alias StaticTuple!(A[0])[0] Foo; } void foo() { } static assert(is(Foo!(int, foo) == int)); void main() { } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- Jun 25 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3092 Stewart Gordon <smjg iname.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code CC| |smjg iname.com --- Comment #2 from Stewart Gordon <smjg iname.com> 2009-06-25 11:33:25 PDT --- Where it's got (int) as a distinct type from, I don't get either. It's always been my understanding that a 1-element tuple and its element are one and the same. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- Jun 25 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3092 Jarrett Billingsley <jarrett.billingsley gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jarrett.billingsley gmail.c | |om --- Comment #3 from Jarrett Billingsley <jarrett.billingsley gmail.com> 2009-06-25 11:46:03 PDT --- (In reply to comment #2)Where it's got (int) as a distinct type from, I don't get either. It's always been my understanding that a 1-element tuple and its element are one and the same. Jun 25 2009
|