The documentation for the std::allocator<T>::allocate member function says in ([allocator.members]) that:
Remarks: The storage for the array is obtained by calling
::operator new([new.delete]), but it is unspecified when or how often this function is called. This function starts the lifetime of the array object, but not that of any of the array elements.
I wonder why it says ::operator new and not just operator new? Does the double colon make any difference? Which other operator new could be called here, if that double colon was omitted?
Prior to LWG2818, [contents]p3 read:
So writing
operator newin the specification would mean::std::operator new, which wouldn't make sense.::operator newcorrectly refers tooperator newin the global namespace.In an implementation of the standard library, there would be no difference between writing
operator newand::operator newsincestd::allocator<T>wouldn't define a memberoperator newand ADL has no effect since there is only one namespace a freeoperator newcould be defined in.