|
Boost : |
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-06-02 19:08:26
AMDG
Sean Huang wrote:
> The following code generates a compile error with VC8+SP1:
>
> **************************************************************************
> #include <boost/lambda/lambda.hpp>
> #if 1 // compiles when set to 0
> # include <boost/utility/result_of.hpp>
> # include <boost/range/functions.hpp>
> #else
> # include <boost/range/functions.hpp>
> # include <boost/utility/result_of.hpp>
> #endif
>
> #include <boost/function.hpp>
> #include <boost/type_traits/is_same.hpp>
>
> typedef boost::function< int ( void ) > FuncType;
>
> BOOST_STATIC_ASSERT( ( boost::is_same< boost::result_of< FuncType ()
>
>> ::type, int >::value ) );
>>
I've traced the problem as far back as I can:
#include <boost/mpl/has_xxx.hpp>
namespace boost {
namespace lambda {
namespace detail {
BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type);
}
}
}
namespace boost { namespace mpl { namespace aux {
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_apply, apply, false)
}}}
#include <boost/mpl/assert.hpp>
struct with_result_type {
typedef int result_type;
};
BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type);
BOOST_MPL_ASSERT((has_result_type<with_result_type>));
In Christ,
Steven Watanabe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk