-
Kenton Varda authored
I have this pattern: Maybe<Own<T>> foo; // ... foo = heap<T>(); KJ_ASSERT_NONNULL(foo)->doSomething(); The assertion feels non-type-safe. Now you can do: auto& ref = foo.emplace(heap<T>()); ref.doSomething();
2ae7ca9b
I have this pattern: Maybe<Own<T>> foo; // ... foo = heap<T>(); KJ_ASSERT_NONNULL(foo)->doSomething(); The assertion feels non-type-safe. Now you can do: auto& ref = foo.emplace(heap<T>()); ref.doSomething();