This is not a big deal, at least in most cases.
In the format ::identifier1::identifier2 previous colon says to look at the global area for identifier1 , and then look for identifier2 in that area.
In the format identifier1::identifier2 instead we look at the current area for identifier1 . If we do not find it, there will be a search for the parent's object, and so on, until we find it. Then we look for identifier2 within the area that we just found.
In the event that you are already in the global scope, it does not matter. But this story changes when you work in a namespace or classes that have other namespaces or classes.
source share