summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/testAutoPtr.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-03-03 20:05:52 (GMT)
committerBrad King <brad.king@kitware.com>2007-03-03 20:05:52 (GMT)
commit8c1f9e1b83c465f4072e541c9e2b1c2a69414d45 (patch)
treeabe65eb0089ec80c85bc7d8db0752e46f89cfe5c /Source/kwsys/testAutoPtr.cxx
parented722cbe619ae6a57ad264a7462314813da44bb3 (diff)
downloadCMake-8c1f9e1b83c465f4072e541c9e2b1c2a69414d45.zip
CMake-8c1f9e1b83c465f4072e541c9e2b1c2a69414d45.tar.gz
CMake-8c1f9e1b83c465f4072e541c9e2b1c2a69414d45.tar.bz2
ENH: Implemented auto_ptr_ref in a way that allows conversion of the pointed-to type.
Diffstat (limited to 'Source/kwsys/testAutoPtr.cxx')
-rw-r--r--Source/kwsys/testAutoPtr.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/Source/kwsys/testAutoPtr.cxx b/Source/kwsys/testAutoPtr.cxx
index 5234428..aa44cb6 100644
--- a/Source/kwsys/testAutoPtr.cxx
+++ b/Source/kwsys/testAutoPtr.cxx
@@ -123,6 +123,7 @@ int testAutoPtr(int, char*[])
}
#if 0
+ // Is this allowed by the standard?
{
int received = function_call(generate_auto_ptr_B());
ASSERT(received,
@@ -144,22 +145,18 @@ int testAutoPtr(int, char*[])
"auto_ptr empty after assignment from factory function");
}
-#if 0
{
kwsys::auto_ptr<A> pa(generate_auto_ptr_B());
ASSERT(pa.get(),
"auto_ptr empty after construction from compatible factory function");
}
-#endif
-#if 0
{
kwsys::auto_ptr<A> pa;
pa = generate_auto_ptr_B();
ASSERT(pa.get(),
"auto_ptr empty after assignment from compatible factory function");
}
-#endif
}
ASSERT(instances == 0, "auto_ptr leaked an object");