More constexpr fixes

This commit is contained in:
Simon Brand committed 2017-12-23 15:43:35 +00:00
commit 01dcb2f7bc
3 files changed
+30 -3

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
#include "catch.hpp"
#include "expected.hpp"
#include <string>
using std::string;
tl::expected<int, string> getInt3(int val)
{
return val;
}
tl::expected<int, string> getInt2(int val)
{
return val;
}
tl::expected<int, string> getInt1()
{
return getInt2(5).and_then(getInt3);
}
TEST_CASE("Issue 1", "[issues.1]") {
getInt1();
}