Are fully qualified class names permitted for ctor declarations?

Discussion in 'C++' started by winkerbean, Oct 27, 2008.

  1. winkerbean

    winkerbean Guest

    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.
    winkerbean, Oct 27, 2008
    #1
    1. Advertising

  2. winkerbean

    Ian Collins Guest

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


    No.

    --
    Ian Collins
    Ian Collins, Oct 27, 2008
    #2
    1. Advertising

  3. winkerbean

    winkerbean Guest

    On Oct 27, 2:19 pm, Ian Collins <> wrote:
    >
    > No.
    >
    > --
    > Ian Collins


    Why?
    winkerbean, Oct 28, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lee
    Replies:
    3
    Views:
    302
    John C. Bollinger
    Feb 5, 2004
  2. S.Marion
    Replies:
    2
    Views:
    476
    Roedy Green
    Mar 3, 2006
  3. ballpointpenthief
    Replies:
    8
    Views:
    319
    Tom Hawtin
    Dec 30, 2006
  4. patrimith
    Replies:
    2
    Views:
    695
    Goldfish
    Oct 11, 2007
  5. Replies:
    0
    Views:
    269
Loading...

Share This Page