Пример #1
0
 static Expected<T> transferException(Expected<U> const& other) {
   if (other.valid()) {
     throw std::invalid_argument(
       "Expected<T>::transferException: other Expected<U> does not contain an exception.");
   }
   return fromException(other.spam);
 }