forked from TartanLlama/expected
Move the error value when throwing an exception in .value rval overloads (#62)
* Move the error value when throwing an exception in .value rval overloads Fixes #61 * Bump version
This commit is contained in:
+10
-1
@@ -126,4 +126,13 @@ TEST_CASE("Issue 49", "[issues.49]") {
|
||||
auto m = test(10)
|
||||
.and_then(test2);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
tl::expected<int, std::unique_ptr<std::string>> func()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
TEST_CASE("Issue 61", "[issues.61]") {
|
||||
REQUIRE(func().value() == 1);
|
||||
}
|
||||
Reference in New Issue
Block a user