mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 15:04:00 +00:00
Workaround compiler problems while waiting to find out if BOOST_STATIC_ASSERT is broken
[SVN r10218]
This commit is contained in:
parent
46fae3aed2
commit
9578f24be9
@ -26,7 +26,7 @@
|
|||||||
#define BOOST_UTILITY_HPP
|
#define BOOST_UTILITY_HPP
|
||||||
|
|
||||||
#include <boost/config.hpp> // broken compiler workarounds
|
#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 <cstddef> // for size_t
|
||||||
#include <utility> // for std::pair
|
#include <utility> // for std::pair
|
||||||
|
|
||||||
@ -44,9 +44,11 @@ namespace boost
|
|||||||
inline void checked_delete(T /*const volatile*/ * x)
|
inline void checked_delete(T /*const volatile*/ * x)
|
||||||
# endif
|
# 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
|
BOOST_STATIC_ASSERT( sizeof(T) ); // assert type complete at point
|
||||||
// of instantiation
|
// of instantiation
|
||||||
|
# else
|
||||||
|
sizeof(T); // force error if type incomplete
|
||||||
# endif
|
# endif
|
||||||
delete x;
|
delete x;
|
||||||
}
|
}
|
||||||
@ -59,9 +61,11 @@ namespace boost
|
|||||||
inline void checked_array_delete(T /*const volatile*/ * x)
|
inline void checked_array_delete(T /*const volatile*/ * x)
|
||||||
# endif
|
# 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
|
BOOST_STATIC_ASSERT( sizeof(T) ); // assert type complete at point
|
||||||
// of instantiation
|
// of instantiation
|
||||||
|
# else
|
||||||
|
sizeof(T); // force error if type incomplete
|
||||||
# endif
|
# endif
|
||||||
delete [] x;
|
delete [] x;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user