11 template <
typename T,
typename E = std::exception>
16 const std::shared_ptr<const T> result;
17 const std::shared_ptr<const E> error;
41 throw std::logic_error(
"Result is not successful");
51 throw std::logic_error(
"Result does not contain an error");