mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 08:41:06 +01:00
Remove RawNew from Arena #807
This commit is contained in:
@@ -25,16 +25,6 @@ class Arena {
|
||||
return ptr;
|
||||
}
|
||||
|
||||
// TODO: Remove. This is only to help findability during migration.
|
||||
template <typename T, typename... Args>
|
||||
auto RawNew(Args&&... args) -> T* {
|
||||
auto smart_ptr =
|
||||
std::make_unique<ArenaEntryTyped<T>>(std::forward<Args>(args)...);
|
||||
T* raw_ptr = smart_ptr->Instance().Get();
|
||||
arena.push_back(std::move(smart_ptr));
|
||||
return raw_ptr;
|
||||
}
|
||||
|
||||
private:
|
||||
// Virtualizes arena entries so that a single vector can contain many types,
|
||||
// avoiding templated statics.
|
||||
|
||||
Reference in New Issue
Block a user