forked from boostorg/type_traits
Added Borland specific fixes for dropped cv-qualifiers.
[SVN r16089]
This commit is contained in:
@ -19,6 +19,40 @@ namespace boost {
|
||||
|
||||
namespace detail {
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
//
|
||||
// For some reason this implementation stops Borlands compiler
|
||||
// from dropping cv-qualifiers, it still fails with references
|
||||
// to arrays for some reason though (shrug...) (JM 20021104)
|
||||
//
|
||||
template <typename T>
|
||||
struct add_pointer_impl
|
||||
{
|
||||
typedef T* type;
|
||||
};
|
||||
template <typename T>
|
||||
struct add_pointer_impl<T&>
|
||||
{
|
||||
typedef T* type;
|
||||
};
|
||||
template <typename T>
|
||||
struct add_pointer_impl<T&const>
|
||||
{
|
||||
typedef T* type;
|
||||
};
|
||||
template <typename T>
|
||||
struct add_pointer_impl<T&volatile>
|
||||
{
|
||||
typedef T* type;
|
||||
};
|
||||
template <typename T>
|
||||
struct add_pointer_impl<T&const volatile>
|
||||
{
|
||||
typedef T* type;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template <typename T>
|
||||
struct add_pointer_impl
|
||||
{
|
||||
@ -26,6 +60,8 @@ struct add_pointer_impl
|
||||
typedef no_ref_type* type;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_pointer,T,typename detail::add_pointer_impl<T>::type)
|
||||
|
Reference in New Issue
Block a user