Remove BOOST_BORLANDC workarounds

This commit is contained in:
Peter Dimov
2024-09-24 18:08:14 +03:00
parent d908c4d288
commit d66b173710
6 changed files with 0 additions and 66 deletions

View File

@ -73,15 +73,11 @@ void * operator new(size_t n) throw(bad_alloc)
return p; return p;
} }
#if !defined(BOOST_BORLANDC) || (BOOST_BORLANDC > 0x551)
void * operator new(size_t n, nothrow_t const &) throw() void * operator new(size_t n, nothrow_t const &) throw()
{ {
return allocate(n, allocated_scalar); return allocate(n, allocated_scalar);
} }
#endif
void * operator new[](size_t n) throw(bad_alloc) void * operator new[](size_t n) throw(bad_alloc)
{ {
void * p = allocate(n, allocated_array); void * p = allocate(n, allocated_array);
@ -95,15 +91,11 @@ void * operator new[](size_t n) throw(bad_alloc)
return p; return p;
} }
#if !defined(BOOST_BORLANDC) || (BOOST_BORLANDC > 0x551)
void * operator new[](size_t n, nothrow_t const &) throw() void * operator new[](size_t n, nothrow_t const &) throw()
{ {
return allocate(n, allocated_array); return allocate(n, allocated_array);
} }
#endif
// debug hooks // debug hooks
namespace boost namespace boost
@ -205,15 +197,11 @@ void operator delete(void * p) throw()
free(pm); free(pm);
} }
#if !defined(BOOST_BORLANDC) || (BOOST_BORLANDC > 0x551)
void operator delete(void * p, nothrow_t const &) throw() void operator delete(void * p, nothrow_t const &) throw()
{ {
::operator delete(p); ::operator delete(p);
} }
#endif
void operator delete[](void * p) throw() void operator delete[](void * p) throw()
{ {
if(p == 0) return; if(p == 0) return;
@ -231,13 +219,9 @@ void operator delete[](void * p) throw()
free(pm); free(pm);
} }
#if !defined(BOOST_BORLANDC) || (BOOST_BORLANDC > 0x551)
void operator delete[](void * p, nothrow_t const &) throw() void operator delete[](void * p, nothrow_t const &) throw()
{ {
::operator delete[](p); ::operator delete[](p);
} }
#endif
#endif // defined(BOOST_SP_ENABLE_DEBUG_HOOKS) #endif // defined(BOOST_SP_ENABLE_DEBUG_HOOKS)

View File

@ -20,23 +20,9 @@
#include <boost/config.hpp> #include <boost/config.hpp>
#include <exception> #include <exception>
#ifdef BOOST_BORLANDC
# pragma warn -8026 // Functions with excep. spec. are not expanded inline
#endif
namespace boost namespace boost
{ {
// The standard library that comes with Borland C++ 5.5.1, 5.6.4
// defines std::exception and its members as having C calling
// convention (-pc). When the definition of bad_weak_ptr
// is compiled with -ps, the compiler issues an error.
// Hence, the temporary #pragma option -pc below.
#if defined(BOOST_BORLANDC) && BOOST_BORLANDC <= 0x564
# pragma option push -pc
#endif
#if defined(BOOST_CLANG) #if defined(BOOST_CLANG)
// Intel C++ on Mac defines __clang__ but doesn't support the pragma // Intel C++ on Mac defines __clang__ but doesn't support the pragma
# pragma clang diagnostic push # pragma clang diagnostic push
@ -57,14 +43,6 @@ public:
# pragma clang diagnostic pop # pragma clang diagnostic pop
#endif #endif
#if defined(BOOST_BORLANDC) && BOOST_BORLANDC <= 0x564
# pragma option pop
#endif
} // namespace boost } // namespace boost
#ifdef BOOST_BORLANDC
# pragma warn .8026 // Functions with excep. spec. are not expanded inline
#endif
#endif // #ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED #endif // #ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED

View File

@ -26,10 +26,6 @@
# define BOOST_SP_NO_SP_CONVERTIBLE # define BOOST_SP_NO_SP_CONVERTIBLE
#endif #endif
#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( BOOST_BORLANDC ) && ( BOOST_BORLANDC < 0x630 )
# define BOOST_SP_NO_SP_CONVERTIBLE
#endif
#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) #if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
namespace boost namespace boost

View File

@ -187,16 +187,12 @@ template< class T > struct sp_if_not_array< T[] >
{ {
}; };
#if !defined( BOOST_BORLANDC ) || !BOOST_WORKAROUND( BOOST_BORLANDC, < 0x600 )
template< class T, std::size_t N > struct sp_if_not_array< T[N] > template< class T, std::size_t N > struct sp_if_not_array< T[N] >
{ {
}; };
#endif #endif
#endif
} // namespace detail } // namespace detail
#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING ) #if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )

View File

@ -80,15 +80,11 @@ template< class T > struct sp_element< T[] >
typedef T type; typedef T type;
}; };
#if !defined( BOOST_BORLANDC ) || !BOOST_WORKAROUND( BOOST_BORLANDC, < 0x600 )
template< class T, std::size_t N > struct sp_element< T[N] > template< class T, std::size_t N > struct sp_element< T[N] >
{ {
typedef T type; typedef T type;
}; };
#endif
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) #endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
// sp_dereference, return type of operator* // sp_dereference, return type of operator*
@ -129,15 +125,11 @@ template< class T > struct sp_dereference< T[] >
typedef void type; typedef void type;
}; };
#if !defined( BOOST_BORLANDC ) || !BOOST_WORKAROUND( BOOST_BORLANDC, < 0x600 )
template< class T, std::size_t N > struct sp_dereference< T[N] > template< class T, std::size_t N > struct sp_dereference< T[N] >
{ {
typedef void type; typedef void type;
}; };
#endif
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) #endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
// sp_member_access, return type of operator-> // sp_member_access, return type of operator->
@ -154,15 +146,11 @@ template< class T > struct sp_member_access< T[] >
typedef void type; typedef void type;
}; };
#if !defined( BOOST_BORLANDC ) || !BOOST_WORKAROUND( BOOST_BORLANDC, < 0x600 )
template< class T, std::size_t N > struct sp_member_access< T[N] > template< class T, std::size_t N > struct sp_member_access< T[N] >
{ {
typedef void type; typedef void type;
}; };
#endif
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) #endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
// sp_array_access, return type of operator[] // sp_array_access, return type of operator[]
@ -179,15 +167,11 @@ template< class T > struct sp_array_access< T[] >
typedef T & type; typedef T & type;
}; };
#if !defined( BOOST_BORLANDC ) || !BOOST_WORKAROUND( BOOST_BORLANDC, < 0x600 )
template< class T, std::size_t N > struct sp_array_access< T[N] > template< class T, std::size_t N > struct sp_array_access< T[N] >
{ {
typedef T & type; typedef T & type;
}; };
#endif
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) #endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
// sp_extent, for operator[] index check // sp_extent, for operator[] index check

View File

@ -31,10 +31,6 @@
#endif #endif
#ifdef BOOST_BORLANDC
# pragma warn -8092 // template argument passed to 'find' is not an iterator
#endif
#include <boost/smart_ptr.hpp> #include <boost/smart_ptr.hpp>
#include <boost/core/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>