Re: enum of tuples

2012-09-26 Thread Van de Bugger
BTW, I use DMD64 D Compiler v2.060 on Fedora 17. ldc2 compiler (LLVM D Compiler LDC trunk, based on DMD v2.059 and LLVM 3.0) produces similar results: $ ldc2 -c -w enum_of_tuples.d enum_of_tuples.d(5): Error: template std.typecons.Tuple!(int,"v").Tuple.opCmp does not match any function templa

enum of tuples

2012-09-26 Thread Van de Bugger
Hi, I faced a little trouble and can not decide if it is a my mistake, a bug in std library or in compiler… Look: $ cat enum_of_structs.d struct T { int v; int opCmp( T rhs ) { return v == rhs.v ? 0 : ( v < rhs.v ? -1 : +1 ); }; }; enum E : T { A = T( 1 ),