Taken out of std::queue. What does ::new or exactly :: do in this syntax?PHP Code:
void
construct(pointer __p, const _Tp& __val) │
{ ::new((void *)__p) _Tp(__val); }
Taken out of std::queue. What does ::new or exactly :: do in this syntax?PHP Code:
void
construct(pointer __p, const _Tp& __val) │
{ ::new((void *)__p) _Tp(__val); }
Basically :: in this case means to use the current namespace new as opposed to one that may have been defined in the std::queue class. I think :: is called the scope resolution operator.
Last edited by pbrane; March 18th, 2013 at 09:46 PM.
Bookmarks