From 5ba5c450e62b7946e018b4ccea52ddc75e703f12 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 28 Feb 2007 09:35:28 -0500 Subject: [PATCH] COMP: Fix for auto_ptr_ref on Borland 5.8. --- Source/kwsys/auto_ptr.hxx.in | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Source/kwsys/auto_ptr.hxx.in b/Source/kwsys/auto_ptr.hxx.in index 7798876f8..f068c9f25 100644 --- a/Source/kwsys/auto_ptr.hxx.in +++ b/Source/kwsys/auto_ptr.hxx.in @@ -17,15 +17,20 @@ namespace @KWSYS_NAMESPACE@ { +template 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 struct auto_ptr_ref +{ + auto_ptr& p_; + explicit auto_ptr_ref(auto_ptr& p): p_(p) {} +}; + // C++98 Standard Section 20.4.5 - Template class auto_ptr. template class auto_ptr { - template struct auto_ptr_ref - { - auto_ptr& p_; - explicit auto_ptr_ref(auto_ptr& p): p_(p) {} - }; X* x_; public: typedef X element_type;