Re: [boost] boost::function MSVC

2002-12-19 Thread Douglas Gregor
On Thursday 19 December 2002 12:25 pm, Steven Ketcham wrote:
> boost_1_29_0\boost\function\function_template.hpp(73): error C2061: syntax
> error : identifier 'any_pointer'
>
> boost_1_29_0\boost\function\function_template.hpp(79):
>see reference to class template instantiation
> 'boost::detail::function::function_invoker0' being compiled
>
> Hopefully this is obvious. Any suggestions?

That's a really strange error, because it appears that 
"boost::detail::function::any_pointer" (defined in 
boost/function/function_base.hpp) never actually got defined. Have you tried 
re-extracting the Boost archive just in case something got mangled? (Note: I 
can't check your sample code at the moment, but you're using almost precisely 
the same configuration that I test on, and this problem has never come up).

Doug
___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost



[boost] boost::function MSVC

2002-12-19 Thread Steven Ketcham
I have an application that was working. Since then I wiped my computer,
reinstalled the os and browser with all the patches. Now it does not
compile.
VC++ 6.0 sp5 win2000.

sample errors (cut down from around 400 plus)

//--
--
boost_1_29_0\boost\function\function_template.hpp(73): error C2061: syntax
error : identifier 'any_pointer'

boost_1_29_0\boost\function\function_template.hpp(79):
   see reference to class template instantiation
'boost::detail::function::function_invoker0' being compiled

Hopefully this is obvious. Any suggestions?

Thanks!

The include file:
//--
--
#ifndef DSIBOOST_H
#define DSIBOOST_H

#include 

#define BOOST_FUNCTION_NO_DEPRECATED

#include "./boost/bind.hpp"
#include "./boost/function.hpp"

typedef boost::function0 CallBackFunctionEmpty;
typedef boost::function0 CallBackFunctionStringVoid;

typedef boost::function1 CallBackFunctionVoidString;
typedef boost::function2
CallBackFunctionIntStringBool;

typedef boost::function1
CallBackFunctionVoidRefString;
typedef boost::function1
CallBackFunctionStringString;

#endif

Sample implementation
//--
--
void CMainFrame::CreateCallBackObject()
{
   CWebBrowserCallBack * cb = new CWebBrowserCallBack();
   _LibraryObject = cb;

   cb->CallBackAddValue = boost::bind(&CMainFrame::DoAddValue, this);
   cb->CallBackRemoveValue = boost::bind(&CMainFrame::DoRemoveValue, this);
   cb->CallBackVoteValues = boost::bind(&CMainFrame::DoVoteValues, this,
_1);
   cb->CallBackEmployeeList =
boost::bind(&HtmlPageRetriever::GetEmployeeList, fHtmlPageRetriever);

   cb->CallBackValuesList = boost::bind(&HtmlPageRetriever::GetValuesList,
fHtmlPageRetriever);
   cb->CallBackAddIncident = boost::bind(&HtmlPageRetriever::DoAddIncident,
fHtmlPageRetriever, _1);
   cb->CallBackGetItemForReviewTemplate =
boost::bind(&CMainFrame::GetItemForReviewTemplate, this, _1, _2);

   cb->CallBackGetItemForReviewTemplate =
boost::bind(&CMainFrame::GetItemForReviewTemplate, this, _1, _2);
   cb->CallBackGetReviewTemplate =
boost::bind(&CMainFrame::GetReviewTemplate, this);
   cb->CallBackSetReviewTemplate =
boost::bind(&HtmlPageRetriever::DoAddReviewTemplate, fHtmlPageRetriever,
_1);
}
//---S. Ketcham Nov 2002




___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost