More void support

This commit is contained in:
Simon Brand
2017-12-23 15:13:38 +00:00
parent 468c403c91
commit 2d7dfc8b02
3 changed files with 118 additions and 76 deletions
+11
View File
@@ -120,4 +120,15 @@ TEST_CASE("Constructors", "[constructors]") {
REQUIRE(!std::is_trivially_move_assignable<decltype(e)>::value);
# endif
}
{
tl::expected<void,int> e;
REQUIRE(e);
}
{
tl::expected<void,int> e (tl::unexpect, 42);
REQUIRE(!e);
REQUIRE(e.error() == 42);
}
}