G
Generic Usenet Account
I am having an argument with a colleague who insists that an
overloaded constructor can call the default constructor using the
initializer list syntax ---- something like this:
class SomeClass
{
public:
SomeClass()
{
std::cout << "This is the default constructor\n";
}
SomeClass(const string& str):SomeClass()
{
std::cout << "This is the overloaded constructor\n";
}
};
I am convinced that is not possible ---- and our compiler also does
not support it. Can someone point me to the correct portion of the C+
+ standard where I can find documentary proof to the contrary? I am
finding 597 references to the word "constructor" in the standard :-(
Thanks,
Song
overloaded constructor can call the default constructor using the
initializer list syntax ---- something like this:
class SomeClass
{
public:
SomeClass()
{
std::cout << "This is the default constructor\n";
}
SomeClass(const string& str):SomeClass()
{
std::cout << "This is the overloaded constructor\n";
}
};
I am convinced that is not possible ---- and our compiler also does
not support it. Can someone point me to the correct portion of the C+
+ standard where I can find documentary proof to the contrary? I am
finding 597 references to the word "constructor" in the standard :-(
Thanks,
Song