diff --git a/include/boost/smart_ptr/make_shared_object.hpp b/include/boost/smart_ptr/make_shared_object.hpp index 1a9d769..c6e28aa 100644 --- a/include/boost/smart_ptr/make_shared_object.hpp +++ b/include/boost/smart_ptr/make_shared_object.hpp @@ -109,12 +109,16 @@ template< class T > struct sp_if_not_array< T[] > { }; +#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) + template< class T, std::size_t N > struct sp_if_not_array< T[N] > { }; #endif +#endif + } // namespace detail #if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING ) diff --git a/include/boost/smart_ptr/shared_ptr.hpp b/include/boost/smart_ptr/shared_ptr.hpp index a696093..3fbe00e 100644 --- a/include/boost/smart_ptr/shared_ptr.hpp +++ b/include/boost/smart_ptr/shared_ptr.hpp @@ -81,11 +81,15 @@ template< class T > struct sp_element< T[] > typedef T type; }; +#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) + template< class T, std::size_t N > struct sp_element< T[N] > { typedef T type; }; +#endif + #endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) // sp_dereference, return type of operator* @@ -126,11 +130,15 @@ template< class T > struct sp_dereference< T[] > typedef void type; }; +#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) + template< class T, std::size_t N > struct sp_dereference< T[N] > { typedef void type; }; +#endif + #endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) // sp_member_access, return type of operator-> @@ -147,11 +155,15 @@ template< class T > struct sp_member_access< T[] > typedef void type; }; +#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) + template< class T, std::size_t N > struct sp_member_access< T[N] > { typedef void type; }; +#endif + #endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) // sp_array_access, return type of operator[] @@ -168,11 +180,15 @@ template< class T > struct sp_array_access< T[] > typedef T & type; }; +#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) + template< class T, std::size_t N > struct sp_array_access< T[N] > { typedef T & type; }; +#endif + #endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) // sp_extent, for operator[] index check