Topic: Class qualified constructor syntax


Author: Gerard Weatherby <gerardw@alum.mit.edu>
Date: 1997/07/10
Raw View
I'm thinking (based on the standard and previous comp.std.c++
discussions) that for a class Foo:
struct Foo {
 Foo(int);
};

It's not legitimate to construct an object with a class qualified
syntax:
Foo::Foo x(3); //invalid creation of named object?
Foo::Foo(7); //invalid creation of unnamed temporary?

Do I have this right?
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]