|
Boost : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2008-06-11 12:38:09
I tried this on my VC 2003 with boost from the trunk and got no problem
#include <boost/function.hpp>
using boost::function;
#include <boost/archive/binary_iarchive.hpp>
int main(int argc, char * argv[])
{
function<void()> fn;
return 0;
}
Robert Ramey
Wang Yun wrote:
>> 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
>>
>>
>
>
>
>> _______________________________________________
>> Unsubscribe & other changes:
>> http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk