On Friday, September 28, 2012 03:56:39 Simen Kjaeraas wrote:
> On 2012-09-27, 00:02, Jonathan M Davis wrote:
> > Classes will not work for the same reason that you can never use a class
> > object as an enum with manifest constants.
>
> Has a decision been made as to whether or not this will be po
On 2012-09-27, 00:02, Jonathan M Davis wrote:
Classes will not work for the same reason that you can never use a class
object as an enum with manifest constants.
Has a decision been made as to whether or not this will be possible in the
future?
--
Simen
On Wednesday, September 26, 2012 23:24:08 bearophile wrote:
> Van de Bugger:
> > Oops. What the problem?
>
> I seems one or more bugs. D named enums are adapted from the C
> language, they were first of all meant to contain simple values
> like ints or chars. The more complex things you keep tryin
Van de Bugger:
Oops. What the problem?
I seems one or more bugs. D named enums are adapted from the C
language, they were first of all meant to contain simple values
like ints or chars. The more complex things you keep trying to
put in them, the more bugs you will find :-) People in D.learn
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
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 ),