Correct failure to set 'filled' flag in maybe_t constructors

This commit is contained in:
ridiculousfish
2018-03-10 02:10:40 -08:00
parent f1803feebf
commit 7764f27170
2 changed files with 10 additions and 3 deletions

View File

@@ -4472,6 +4472,13 @@ void test_maybe() {
do_test(m2.missing_or_empty());
m2 = none();
do_test(m2.missing_or_empty());
maybe_t<std::string> m0 = none();
maybe_t<std::string> m3("hi");
maybe_t<std::string> m4 = m3;
do_test(m4 && *m4 == "hi");
maybe_t<std::string> m5 = m0;
do_test(!m5);
}
void test_layout_cache() {