www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Another reason static opCall is not a constructor

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
Nov 04 2007