Boost logo

Boost :

From: Wang Yun (a_hao_at_[hidden])
Date: 2008-06-11 04:13:50


Hi,

I meet a compile error of boost::function only when I add this line
#include <boost/archive/binary_iarchive.hpp>

I'm using VC2005, boost 1.35.0

error message:

error C2872: 'function' : ambiguous symbol
1> could be
'e:\libraries\boost_1_35_0\boost\function\function_base.hpp(106) :
boost::function'
1> or 'boost::detail::function'
1> or 'e:\libraries\boost_1_35_0\boost\function\function_base.hpp(106) :
boost::function'

// ======= the code ===============================

#include "stdafx.h"

#include <boost/function.hpp>
using boost::function;

#include <boost/archive/binary_iarchive.hpp> //////////////// when add
this line, error will happen

int _tmain(int argc, _TCHAR* argv[])
{
function<void()> fn;

return 0;
}

//==================================================

Thanks,
Wang Yun


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