Reputation: 3347
I came across the following code structure in C++:
uint32_t AClass::Action(....)
{
..
status = ::Action(...);
..
}
I am not sure what ::Action()
means. Which class does it belongs to? NOTE: the argument list of ::Action(...)
is different from AClass::Action(...)
.
Upvotes: 4
Views: 3271
Reputation: 304
::Action() mean it is a function under the the global namespace.
Upvotes: -2
Reputation: 13354
The leading ::
just means that Action
here refers to a non-member function in the global namespace, instead of referring to AClass::Action
in the current namespace.
Upvotes: 13