Results 1 to 2 of 2

Thread: Someone explain ::new c++

  1. #1
    Join Date
    Apr 2008
    Beans
    221

    Someone explain ::new c++

    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?

  2. #2
    Join Date
    Dec 2007
    Location
    Gainesville, Florida
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Someone explain ::new c++

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •