We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e447a5 commit 831c8a1Copy full SHA for 831c8a1
1 file changed
include/rfl/Result.hpp
@@ -458,9 +458,14 @@ class std::bad_expected_access<rfl::Error> : public bad_expected_access<void> {
458
459
const char* what() const noexcept override { return err_.what().c_str(); }
460
461
- [[nodiscard]]
462
- auto error() const noexcept {
463
- return err_;
+ [[nodiscard]] rfl::Error& error() & noexcept { return err_; }
+
+ [[nodiscard]] const rfl::Error& error() const& noexcept { return err_; }
464
465
+ [[nodiscard]] rfl::Error&& error() && noexcept { return std::move(err_); }
466
467
+ [[nodiscard]] const rfl::Error&& error() const&& noexcept {
468
+ return std::move(err_);
469
}
470
471
private:
0 commit comments