Another reason static opCall is not a constructor

Bill Baxter dnewsgroup at billbaxter.com
Sun Nov 4 10:32:03 PST 2007


I ran into a little difficulty recently when converting a class into a 
struct.  The class had opCall overloaded to do something, but also a 
constructor that took the same arguments.

I was quite displeased to find that you can't have a static opCall and 
an opCall with the same argument signature.  It makes sense why it 
happens, but it's yet another reason why lack of a special constructor 
syntax for structs is less than optimal.

--bb



More information about the Digitalmars-d mailing list