By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,740 Members | 844 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,740 IT Pros & Developers. It's quick & easy.

Are fully qualified class names permitted for ctor declarations?

P: n/a
Given the following:

class A
{
class B
{
A::B( A::B const & );
};
};

Is the above ctor declaration valid C++? ISO C++ 2003, 12.1,
paragraph 1 states:

"Constructors do not have names. A special declarator syntax using an
optional sequence of function-specifiers (7.1.2) followed by the
constructor’s class name followed by a parameter list is used to
declare or define the constructor. In such a declaration, optional
parentheses around the constructor class name are ignored."

However, as best I can tell, the ISO standard does not specify if the
class name may or may not be a fully qualified class name.

Thanks in advance.
Oct 27 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
winkerbean wrote:
Given the following:

class A
{
class B
{
A::B( A::B const & );
};
};

Is the above ctor declaration valid C++?
No.

--
Ian Collins
Oct 27 '08 #2

P: n/a
On Oct 27, 2:19*pm, Ian Collins <ian-n...@hotmail.comwrote:
>
No.

--
Ian Collins
Why?
Oct 28 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.