Workaround compiler problems while waiting to find out if BOOST_STATIC_ASSERT is broken

[SVN r10218]
This commit is contained in:
Beman Dawes 2001-05-24 16:02:42 +00:00
parent 46fae3aed2
commit 9578f24be9

View File

@ -26,7 +26,7 @@
#define BOOST_UTILITY_HPP
#include <boost/config.hpp> // broken compiler workarounds
#include <boost/static_assert.hpp> // broken compiler workarounds
#include <boost/static_assert.hpp>
#include <cstddef> // for size_t
#include <utility> // for std::pair
@ -44,9 +44,11 @@ namespace boost
inline void checked_delete(T /*const volatile*/ * x)
# endif
{
# if !defined(__BORLANDC__) || __BORLANDC__ > 0x0551
# if !((defined(__BORLANDC__) && __BORLANDC__ <= 0x0551) || (defined(__ICL) && __ICL <= 500))
BOOST_STATIC_ASSERT( sizeof(T) ); // assert type complete at point
// of instantiation
# else
sizeof(T); // force error if type incomplete
# endif
delete x;
}
@ -59,9 +61,11 @@ namespace boost
inline void checked_array_delete(T /*const volatile*/ * x)
# endif
{
# if !defined(__BORLANDC__) || __BORLANDC__ > 0x0551
# if !((defined(__BORLANDC__) && __BORLANDC__ <= 0x0551) || (defined(__ICL) && __ICL <= 500))
BOOST_STATIC_ASSERT( sizeof(T) ); // assert type complete at point
// of instantiation
# else
sizeof(T); // force error if type incomplete
# endif
delete [] x;
}