Is ':' an operator?

Discussion in 'C++' started by Suman, Mar 21, 2007.

  1. Suman

    Suman Guest

    Hello All,

    I have never ever thought about this, till recently I cam across a
    book (COM/DCOM Primer)
    where ':' is referred to as the scope resolution operator used in the
    following context:

    class Derived : public Base {
    ....

    Now, '::' is what I know of as the scope resolution operator. This
    leads me to ask:
    [1] Is ':' at all an operator when used in the above context,
    [2] If so, does it have a proper name such as colon operator?
    [3] Is it correct to refer to it as the scope resolution opeator?
    [4] What does the standard say?

    Regards,
    Suman
     
    Suman, Mar 21, 2007
    #1
    1. Advertising

  2. Suman

    Guest

    On Mar 21, 12:58 am, "Suman" <> wrote:
    > Hello All,
    >
    > I have never ever thought about this, till recently I cam across a
    > book (COM/DCOM Primer)
    > where ':' is referred to as the scope resolution operator used in the
    > following context:
    >
    > class Derived : public Base {
    > ...
    >
    > Now, '::' is what I know of as the scope resolution operator. This
    > leads me to ask:
    > [1] Is ':' at all an operator when used in the above context,
    > [2] If so, does it have a proper name such as colon operator?
    > [3] Is it correct to refer to it as the scope resolution opeator?
    > [4] What does the standard say?



    "::" is the scope resolution operator. The colon in question is just
    part of the syntax of the base-clause, it has no specific name that
    I'm aware of.
     
    , Mar 21, 2007
    #2
    1. Advertising

  3. Suman

    Noah Roberts Guest

    wrote:
    > On Mar 21, 12:58 am, "Suman" <> wrote:
    >> Hello All,
    >>
    >> I have never ever thought about this, till recently I cam across a
    >> book (COM/DCOM Primer)
    >> where ':' is referred to as the scope resolution operator used in the
    >> following context:
    >>
    >> class Derived : public Base {
    >> ...
    >>
    >> Now, '::' is what I know of as the scope resolution operator. This
    >> leads me to ask:
    >> [1] Is ':' at all an operator when used in the above context,
    >> [2] If so, does it have a proper name such as colon operator?
    >> [3] Is it correct to refer to it as the scope resolution opeator?
    >> [4] What does the standard say?

    >
    >
    > "::" is the scope resolution operator. The colon in question is just
    > part of the syntax of the base-clause, it has no specific name that
    > I'm aware of.
    >


    It is also used in label specifiers for goto and swich case statements.
    The standard does not appear to give it any name but it appears in the
    syntactic definitions of these things.
     
    Noah Roberts, Mar 21, 2007
    #3
  4. Suman

    Suman Guest

    On Mar 21, 9:37 pm, Noah Roberts <> wrote:
    > wrote:
    > > On Mar 21, 12:58 am, "Suman" <> wrote:
    > >> Hello All,

    >
    > >> I have never ever thought about this, till recently I cam across a
    > >> book (COM/DCOM Primer)
    > >> where ':' is referred to as the scope resolution operator used in the
    > >> following context:

    >

    [...]
    > > "::" is the scope resolution operator. The colon in question is just
    > > part of the syntax of the base-clause, it has no specific name that
    > > I'm aware of.

    >
    > It is also used in label specifiers for goto and swich case statements.
    > The standard does not appear to give it any name but it appears in the
    > syntactic definitions of these things.


    And to begin initializer lists.

    Thanks a lot for your replies.

    Regards,
    Suman
     
    Suman, Mar 23, 2007
    #4
    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. Jakob Bieling

    Q: operator void* or operator bool?

    Jakob Bieling, Mar 5, 2004, in forum: C++
    Replies:
    2
    Views:
    587
    Rob Williscroft
    Mar 5, 2004
  2. John Smith
    Replies:
    2
    Views:
    423
    Ivan Vecerina
    Oct 6, 2004
  3. Alex Vinokur
    Replies:
    4
    Views:
    3,053
    Peter Koch Larsen
    Nov 26, 2004
  4. Alex Vinokur
    Replies:
    3
    Views:
    5,030
    Jeff Schwab
    Mar 20, 2005
  5. Tim Clacy
    Replies:
    15
    Views:
    2,689
    Kanenas
    May 30, 2005
Loading...

Share This Page