is it placement new?

Discussion in 'C++' started by Wenjie, Jun 26, 2003.

  1. Wenjie

    Wenjie Guest

    Hello,


    I read that the placement new looks like:
    void* SomeClass::eek:perator new(size_t, void* location)
    {
    return location;
    }

    If for some reason, I overload the operator new as:
    void* SomeClass::eek:perator new(size_t, unsigned int locationIndex)
    {
    //...
    }
    Am I defining another placement new? Or what to call it,
    "my overloaded operator new"?

    BTW, should I #include <new> for my overloaded operator new?
    I didn't but it compiles (on VC++6.0).


    Thanks and best regards,
     
    Wenjie, Jun 26, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gcc
    Replies:
    11
    Views:
    15,440
    David Dorward
    Jun 10, 2004
  2. lallous
    Replies:
    10
    Views:
    620
    Steve Dubak
    Mar 6, 2004
  3. Peter Olcott
    Replies:
    11
    Views:
    2,837
    David Rubin
    Mar 1, 2004
  4. Giancarlo Niccolai

    Virtual dtor and placement new.

    Giancarlo Niccolai, Aug 16, 2004, in forum: C++
    Replies:
    23
    Views:
    1,169
    Kai-Uwe Bux
    Aug 16, 2004
  5. Mark P
    Replies:
    6
    Views:
    837
    James Dennett
    Apr 27, 2005
Loading...

Share This Page