Replaceable
Summary:
An instance of `Replaceable<T>` wraps an instance of `T`.
You access the inner `T` instance with `operator*` and `operator->` (as if
it were a smart pointer).
`Replaceable<T>` adds no indirection cost and performs no allocations.
`Replaceable<T>` has the same size and alignment as `T`.
You can replace the `T` within a `Replaceable<T>` using the `emplace` method
(presuming that it is constructible and destructible without throwing
exceptions). If the destructor or constructor you're using could throw an
exception you should use `Optional<T>` instead, as it's not a logic error for
that to be empty.
Reviewed By: yfeldblum
Differential Revision:
D5346528
fbshipit-source-id:
c7d72e73ea04e371325327a7ff0b345315d6e5ac