소스 검색

fix: .value() should not be noexcept

Sam Jaffe 2 주 전
부모
커밋
ec36ba19eb
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      include/jvalidate/compat/expected.h

+ 3 - 3
include/jvalidate/compat/expected.h

@@ -146,21 +146,21 @@ public:
   constexpr T & operator*() & noexcept { return *std::get_if<0>(&value_); }
   constexpr T && operator*() && noexcept { return std::move(*std::get_if<0>(&value_)); }
 
-  constexpr const T & value() const & noexcept {
+  constexpr const T & value() const & {
     if (JVALIDATE_LIKELY(has_value())) {
       return operator*();
     }
     throw bad_expected_access(error());
   }
 
-  constexpr T & value() & noexcept {
+  constexpr T & value() & {
     if (JVALIDATE_LIKELY(has_value())) {
       return operator*();
     }
     throw bad_expected_access(std::as_const(error()));
   }
 
-  constexpr T && value() && noexcept {
+  constexpr T && value() && {
     if (JVALIDATE_LIKELY(has_value())) {
       return std::move(*this).operator*();
     }