[libcxx-commits] [PATCH] D57455: [libunwind] Provide inline placement new definition

Richard Smith - zygoloid via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 1 13:49:43 PST 2019


rsmith added inline comments.


================
Comment at: libunwind/src/Unwind-seh.cpp:54
+// need our own defition of inline placement new.
+inline void *operator new(size_t, void* p) { return p; }
 
----------------
To avoid conflicting with the standard library, how about changing this to something like:

```
namespace { struct placement_new { void *where; }; }
void *operator new(size_t, placement_new where) { return where.where; }
```

(and calling it as `new (placement_new{addr}) T`)?


Repository:
  rUNW libunwind

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57455/new/

https://reviews.llvm.org/D57455





More information about the libcxx-commits mailing list