summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-02-28 14:35:28 (GMT)
committerBrad King <brad.king@kitware.com>2007-02-28 14:35:28 (GMT)
commit5ba5c450e62b7946e018b4ccea52ddc75e703f12 (patch)
tree2198373baa9f8687c51d92eef465ca25491b2127 /Source
parent6c82483cdb2555e9e4f5650548c613fb60b04b85 (diff)
downloadCMake-5ba5c450e62b7946e018b4ccea52ddc75e703f12.zip
CMake-5ba5c450e62b7946e018b4ccea52ddc75e703f12.tar.gz
CMake-5ba5c450e62b7946e018b4ccea52ddc75e703f12.tar.bz2
COMP: Fix for auto_ptr_ref on Borland 5.8.
Diffstat (limited to 'Source')
-rw-r--r--Source/kwsys/auto_ptr.hxx.in15
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/kwsys/auto_ptr.hxx.in b/Source/kwsys/auto_ptr.hxx.in
index 7798876..f068c9f 100644
--- a/Source/kwsys/auto_ptr.hxx.in
+++ b/Source/kwsys/auto_ptr.hxx.in
@@ -17,15 +17,20 @@
namespace @KWSYS_NAMESPACE@
{
+template <class X> class auto_ptr;
+
+// The auto_ptr_ref template is supposed to be a private member of
+// auto_ptr but Borland 5.8 cannot handle it.
+template <class Y> struct auto_ptr_ref
+{
+ auto_ptr<Y>& p_;
+ explicit auto_ptr_ref(auto_ptr<Y>& p): p_(p) {}
+};
+
// C++98 Standard Section 20.4.5 - Template class auto_ptr.
template <class X>
class auto_ptr
{
- template <class Y> struct auto_ptr_ref
- {
- auto_ptr<Y>& p_;
- explicit auto_ptr_ref(auto_ptr<Y>& p): p_(p) {}
- };
X* x_;
public:
typedef X element_type;