diff --git a/tests/library/meta/access-casted-test.cpp b/tests/library/meta/access-casted-test.cpp index 2588fa0e8..391cb3c49 100644 --- a/tests/library/meta/access-casted-test.cpp +++ b/tests/library/meta/access-casted-test.cpp @@ -225,9 +225,17 @@ namespace test { cout << "Access(E(F)* as F&) --->" << AccessCasted::access(pEF) <" << AccessCasted::access(pEF) <" << AccessCasted::access(pF) <" << AccessCasted::access(pXF) <" << AccessCasted::access(pXF) <" << AccessCasted::access(pF) <::access(pEF); // cross-cast not supported (to complicated to implement) // AccessCasted::access(pXF); // downcast not possible, since X does not provide RTTI + + int i = 2; + float fp = 3.1415; + cout << "Access(int as double) --->" << AccessCasted::access(i) <" << AccessCasted::access(fp) <::access(i); // would undermine the type system, thus ruled out + // AccessCasted::access(i); // allowed, but warning: returning reference to temporary (and the warning is justified) } };