forked from boostorg/iterator
Workarounds for Borland
Improved assertion output [SVN r29779]
This commit is contained in:
@ -20,6 +20,7 @@ struct zow { };
|
|||||||
|
|
||||||
struct my_ptr {
|
struct my_ptr {
|
||||||
typedef zow const element_type;
|
typedef zow const element_type;
|
||||||
|
zow const& operator*() const;
|
||||||
// typedef const zow& reference;
|
// typedef const zow& reference;
|
||||||
// typedef const zow* pointer;
|
// typedef const zow* pointer;
|
||||||
// typedef void difference_type;
|
// typedef void difference_type;
|
||||||
|
@ -5,35 +5,16 @@
|
|||||||
#ifndef STATIC_ASSERT_SAME_DWA2003530_HPP
|
#ifndef STATIC_ASSERT_SAME_DWA2003530_HPP
|
||||||
# define STATIC_ASSERT_SAME_DWA2003530_HPP
|
# define STATIC_ASSERT_SAME_DWA2003530_HPP
|
||||||
|
|
||||||
# include <boost/type.hpp>
|
#include <boost/mpl/assert.hpp>
|
||||||
# include <boost/static_assert.hpp>
|
# include <boost/type_traits/is_same.hpp>
|
||||||
|
|
||||||
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
#define STATIC_ASSERT_SAME( T1,T2 ) BOOST_MPL_ASSERT((::boost::is_same< T1, T2 >))
|
||||||
template <class T, class U>
|
|
||||||
struct static_assert_same_base;
|
|
||||||
|
|
||||||
template <class T>
|
template <class T1, class T2>
|
||||||
struct static_assert_same_base<T,T>
|
struct static_assert_same
|
||||||
{
|
{
|
||||||
|
BOOST_MPL_ASSERT((::boost::is_same< T1, T2 >));
|
||||||
enum { value = 1 };
|
enum { value = 1 };
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T, class U>
|
|
||||||
struct static_assert_same : static_assert_same_base<T,U> {};
|
|
||||||
|
|
||||||
#else
|
|
||||||
# include <boost/mpl/if.hpp>
|
|
||||||
# include <boost/mpl/bool.hpp>
|
|
||||||
# include <boost/type_traits/is_same.hpp>
|
|
||||||
|
|
||||||
template <class T, class U>
|
|
||||||
struct static_assert_same
|
|
||||||
: boost::mpl::if_<boost::is_same<T,U>,boost::mpl::true_,void>::type
|
|
||||||
{};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define STATIC_ASSERT_SAME( T1,T2 ) \
|
|
||||||
enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \
|
|
||||||
= static_assert_same<T1,T2>::value }
|
|
||||||
|
|
||||||
#endif // STATIC_ASSERT_SAME_DWA2003530_HPP
|
#endif // STATIC_ASSERT_SAME_DWA2003530_HPP
|
||||||
|
Reference in New Issue
Block a user