mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 21:01:21 +01:00
Add Ptr and RawNew for migration (#751)
Co-authored-by: Geoff Romer <gromer@google.com>
This commit is contained in:
committed by
GitHub
co-authored by
Geoff Romer
parent
1eeaa208f2
commit
c6ebe0db67
@@ -37,8 +37,8 @@ class Dictionary {
|
||||
// Associate the value v with key k in the dictionary.
|
||||
// Time complexity: O(1).
|
||||
auto Set(const K& k, const V& v) -> void {
|
||||
head = global_arena->New<ListNode<std::pair<K, V>>>(std::make_pair(k, v),
|
||||
head);
|
||||
head = global_arena->RawNew<ListNode<std::pair<K, V>>>(std::make_pair(k, v),
|
||||
head);
|
||||
}
|
||||
|
||||
typedef ListNodeIterator<std::pair<K, V>> Iterator;
|
||||
|
||||
Reference in New Issue
Block a user