Remove compiler workarounds no longer needed due to BOOST_STATIC_ASSERT fix. For stylistic reasons, change sizeof() test to sizeof() != 0

[SVN r10236]
This commit is contained in:
Beman Dawes 2001-05-28 14:22:30 +00:00
parent 1bb1898ab9
commit 43f525298e

View File

@ -39,24 +39,16 @@ namespace boost
template< typename T > template< typename T >
inline void checked_delete(T * x) inline void checked_delete(T * x)
{ {
# if !((defined(__BORLANDC__) && __BORLANDC__ <= 0x0551) || (defined(__ICL) && __ICL <= 500)) BOOST_STATIC_ASSERT( sizeof(T) != 0 ); // assert type complete at point
BOOST_STATIC_ASSERT( sizeof(T) ); // assert type complete at point // of instantiation
// of instantiation
# else
sizeof(T); // force error if type incomplete
# endif
delete x; delete x;
} }
template< typename T > template< typename T >
inline void checked_array_delete(T * x) inline void checked_array_delete(T * x)
{ {
# if !((defined(__BORLANDC__) && __BORLANDC__ <= 0x0551) || (defined(__ICL) && __ICL <= 500)) BOOST_STATIC_ASSERT( sizeof(T) != 0 ); // assert type complete at point
BOOST_STATIC_ASSERT( sizeof(T) ); // assert type complete at point // of instantiation
// of instantiation
# else
sizeof(T); // force error if type incomplete
# endif
delete [] x; delete [] x;
} }