We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c732e45 commit cbd7708Copy full SHA for cbd7708
1 file changed
include/rfl/Result.hpp
@@ -445,4 +445,16 @@ inline Unexpected<Error> error(const Error& _err) {
445
446
} // namespace rfl
447
448
+#ifdef REFLECTCPP_USE_STD_EXPECTED
449
+template <>
450
+class std::bad_expected_access<rfl::Error> : public bad_expected_access<void> {
451
+ public:
452
+ explicit constexpr bad_expected_access(rfl::Error er) : err_(std::move(er)) {}
453
+ const char* what() const noexcept override { return err_.what().c_str(); }
454
+
455
+ private:
456
+ rfl::Error err_;
457
+};
458
#endif
459
460
+#endif
0 commit comments