On 16.10.2010 14:49, Sven Barth wrote:
Is this a bug (I'm using 2.4.0, but I've tested it with a 2.5.1 from end
of August as well)? Or is it not possible to use such an overload (which
would be a pity...)?

I've searched Mantis a bit and stumpled upon this bug report: http://bugs.freepascal.org/view.php?id=13473

Jonas writes in the comments:

==== quote begin ====

> It is not possible to overload operators involving ordinal types

Well, operators involving only combinations of ordinals, enums and strings.

==== quote end ====

Is this the case for sets as well?

The following are the cases that I'd like to overload:

SomeSet := SomeLongInt (converting a C-style flags int to a set)
SomeLongInt := SomeSet (converting a set to a C-style flags int)
SomeString := SomeSet (for writing a set to console)

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to