diff --git a/.travis.yml b/.travis.yml index dab821b..2359d7b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -143,7 +143,6 @@ matrix: packages: - g++-5 env: COMPILER=g++-5 CXXSTD=14 - - compiler: gcc addons: apt: diff --git a/tests/issues.cpp b/tests/issues.cpp index dcb37d8..8eef3a5 100644 --- a/tests/issues.cpp +++ b/tests/issues.cpp @@ -26,6 +26,15 @@ TEST_CASE("Issue 17", "[issues.17]") { struct a {}; struct b : a {}; +auto doit() -> tl::expected, int> { + return tl::make_unexpected(0); +} + +TEST_CASE("Issue 23", "[issues.23]") { + tl::expected, int> msg = doit(); + REQUIRE(!msg.has_value()); +} + TEST_CASE("Issue 26", "[issues.26]") { tl::expected exp = tl::expected(tl::unexpect, 0); REQUIRE(!exp.has_value());