f



Are fully qualified class names permitted for ctor declarations?

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=92s 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.
0
10/27/2008 4:01:10 PM
comp.lang.c++ 49423 articles. 6 followers. Post Follow

2 Replies
200 Views

Similar Articles

[PageSpeed] 47

winkerbean wrote:
> Given the following:
> 
> class A
>     {
>     class B
>         {
>         A::B( A::B const & );
>         };
>     };
> 
> Is the above ctor declaration valid C++? 

No.

-- 
Ian Collins
0
ian-news (10155)
10/27/2008 6:19:07 PM
On Oct 27, 2:19=A0pm, Ian Collins <ian-n...@hotmail.com> wrote:
>
> No.
>
> --
> Ian Collins

Why?
0
10/28/2008 3:51:20 PM
Reply: