Is ':' an operator?

S

Suman

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
 
R

robertwessel2

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.
 
N

Noah Roberts

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.
 
S

Suman

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top