This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: AIX I/O failures


>>>>> "Gabriel" == Gabriel Dos Reis <gdr@codesourcery.com> writes:

    Gabriel> Placement new is a different matter -- it keeps the type
    Gabriel> as is.

Not in general.  Things like:

  char* c = new char [sizeof(S)] ;
  new (c) S;

are specifically endorsed.

The usage I gave was actually one of the earlier motivations for
placement new, IIRC.  The idea being that you sometimes wanted to
control *when* an object was constructed, but specifically *not* have
to pay for an extra indirection.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]