Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-02-03 12:33:08


Hi,

I've encountered some compile errors using is_incrementable with VC6. They can
be fixed by fully qualifying remove_cv and by using macros from type traits to
define the traits is_incrementable and is_postfix_incrementable:

    # include <boost/type_traits/detail/bool_trait_def.hpp>
    ....
    // Local macro, #undef'd below
    # define BOOST_DETAIL_BOOL_TRAIT_DEF1(trait,T,C) \
    template< typename T > struct trait \
        BOOST_TT_AUX_BOOL_C_BASE(C) \
    { \
        BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
    }; \
    /**/
    BOOST_DETAIL_BOOL_TRAIT_DEF1(is_incrementable, T,
        ::boost::detail::is_incrementable_::impl<T>::value)
    BOOST_DETAIL_BOOL_TRAIT_DEF1(is_postfix_incrementable, T,
        ::boost::detail::is_incrementable_::postfix_impl<T>::value)
    # undef BOOST_DETAIL_BOOL_TRAIT_DEF1

Can I go ahead and add this stuff? Also, should I put in lambda and template
arity support?

Other options would be:
* add a header detail/bool_trait_def.hpp for defining traits in namespace
detail.
* write a macro for generating traits like is_incrementable

Jonathan


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk