Add test that reproduces issue

This commit is contained in:
Treb Connell 2015-09-28 18:34:04 -07:00
parent b29566628e
commit 83333419de

View File

@ -178,6 +178,12 @@ SUITE(MaybeNullTests)
maybe_null<MyBase*> q = p;
CHECK(q == p);
maybe_null_dbg<MyDerived*> pdbg = &derived;
CHECK(pdbg.present());
maybe_null_dbg<MyBase*> qdbg = pdbg;
CHECK(qdbg == pdbg);
#ifdef CONFIRM_COMPILATION_ERRORS
maybe_null<Unrelated*> r = p;
maybe_null<Unrelated*> s = reinterpret_cast<Unrelated*>(p);