Closed viboes closed 10 years ago
namespace category { struct pointer_like {}; } template <> struct value_traits<category::pointer_like> { template <class M> using type = typename M::value_type; template <class M> static constexpr bool has_value(M&& m) { return bool(m); }; template <class M> static constexpr auto derreference(M&& m) -> decltype(*m) { return *m; }; };
Vicente J. Botet Escriba Moved have_value and pointer_like. fixes #3 & #8. https://github.com/ptal/Boost.Expected/commit/d504e8831e05b163160cbd0453dcd1329c1dc2ae