
On Wed, Feb 14, 2018 at 3:18 PM, Miguel Ojeda via Boost < boost@lists.boost.org> wrote:
IMO, such a class is definitely useful.
Design concerns:
- unique_val should be copyable if T is copyable. Whether or not a type
which aggregates this is copyable is an orthogonal, separate concern from
what the moved-from state should be. If you go this route, unique_val is
the wrong name.
- Instead of providing operator bool(), why not provide operator T&()
and operator T const&()?
- What about comparisons of the form: unique_val