The [Optional](https://github.com/lyft/envoy/blob/master/include/envoy/common/optional.h) implementation doesn't handle r-value references and hence can't be used with move-only types, like std::unique_ptr. Adding a move constructor solves this problem, http://ideone.com/PpByK5 _sidenote_: the rule of 5 might be applicable http://en.cppreference.com/w/cpp/language/rule_of_three
The Optional implementation doesn't handle r-value references and hence can't be used with move-only types, like std::unique_ptr.
Adding a move constructor solves this problem, http://ideone.com/PpByK5
sidenote: the rule of 5 might be applicable http://en.cppreference.com/w/cpp/language/rule_of_three