On 2009-07-14 16:46:12 -0400, "Lars T. Kyllingstad" <pub...@kyllingen.nospamnet> said:

I don't think it should be this simple. If I do this:

   class Vector
   {
       this (size_t length) { ... }
   }

I don't want to be able to write this:

   Vector v = 3;

I agree. Constructors which can be used for implicit casting should be explicitly identified. Perhaps this way?

        class A
        {
                alias this(uint i) { ... }
        }


--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/

Reply via email to