Boost logo

Boost :

From: Sean Huang (huangsean_at_[hidden])
Date: 2008-06-02 14:15:14


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 ) );

This compiles with intel C++ 9.1.

Change the inclusion order of result_of and functions.hpp and it compiles
with VC8 too.

Looks like a bug in VC8.

Does anybody know any workaround for this besides enforcing the header
order?

Regards,

Sean


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