diff --git a/include/boost/shared_ptr.hpp b/include/boost/shared_ptr.hpp index 6cb187d..cf43a1e 100644 --- a/include/boost/shared_ptr.hpp +++ b/include/boost/shared_ptr.hpp @@ -75,7 +75,7 @@ template class shared_ptr private: // Borland 5.5.1 specific workarounds - typedef checked_deleter deleter; +// typedef checked_deleter deleter; typedef shared_ptr this_type; public: @@ -86,7 +86,8 @@ public: { } - explicit shared_ptr(T * p): px(p), pn(p, deleter()) // requires complete type + template + explicit shared_ptr(Y * p): px(p), pn(p, checked_deleter()) // Y must be complete { } @@ -96,13 +97,14 @@ public: // shared_ptr will release p by calling d(p) // - template shared_ptr(T * p, D d): px(p), pn(p, d) + template shared_ptr(Y * p, D d): px(p), pn(p, d) { } // generated copy constructor, assignment, destructor are fine - explicit shared_ptr(weak_ptr const & r): px(r.px), pn(r.pn) // may throw + template + explicit shared_ptr(weak_ptr const & r): px(r.px), pn(r.pn) // may throw { } @@ -176,13 +178,13 @@ public: this_type().swap(*this); } - void reset(T * p) // requires complete type + template void reset(Y * p) // Y must be complete { BOOST_ASSERT(p == 0 || p != px); // catch self-reset errors this_type(p).swap(*this); } - template void reset(T * p, D d) + template void reset(Y * p, D d) { this_type(p, d).swap(*this); } diff --git a/shared_ptr_mt_test.cpp b/shared_ptr_mt_test.cpp index 489aa7c..185bd99 100644 --- a/shared_ptr_mt_test.cpp +++ b/shared_ptr_mt_test.cpp @@ -1,4 +1,4 @@ -#if defined(_MSC_VER) && !defined(__ICL) +#if defined(_MSC_VER) && !defined(__ICL) && !defined(__COMO__) #pragma warning(disable: 4786) // identifier truncated in debug info #pragma warning(disable: 4710) // function not inlined #pragma warning(disable: 4711) // function selected for automatic inline expansion diff --git a/shared_ptr_test.cpp b/shared_ptr_test.cpp index 7b1b960..9ef6d3d 100644 --- a/shared_ptr_test.cpp +++ b/shared_ptr_test.cpp @@ -1,4 +1,4 @@ -#if defined(_MSC_VER) && !defined(__ICL) +#if defined(_MSC_VER) && !defined(__ICL) && !defined(__COMO__) #pragma warning(disable: 4786) // identifier truncated in debug info #pragma warning(disable: 4710) // function not inlined #pragma warning(disable: 4711) // function selected for automatic inline expansion diff --git a/shared_ptr_timing_test.cpp b/shared_ptr_timing_test.cpp index 53fa314..299261b 100644 --- a/shared_ptr_timing_test.cpp +++ b/shared_ptr_timing_test.cpp @@ -1,4 +1,4 @@ -#if defined(_MSC_VER) && !defined(__ICL) +#if defined(_MSC_VER) && !defined(__ICL) && !defined(__COMO__) #pragma warning(disable: 4786) // identifier truncated in debug info #pragma warning(disable: 4710) // function not inlined #pragma warning(disable: 4711) // function selected for automatic inline expansion