Boost logo

Boost :

Subject: Re: [boost] [bind] Error C4430 in bind.hpp
From: Darren Garvey (darren.garvey_at_[hidden])
Date: 2012-03-15 12:06:48


On 15 March 2012 11:59, Robert Dailey <rcdailey_at_[hidden]> wrote:

> On Thu, Mar 15, 2012 at 9:25 AM, Lars Viklund <zao_at_[hidden]> wrote:
>
> > On Thu, Mar 15, 2012 at 08:25:54AM -0500, Robert Dailey wrote:
> > > >> For some reason when I include <boost/bind.hpp> I get the following
> > > >> errors:
> > > >>
> > > >>
> >
> 1>c:\code\work\cmake-mds\build-vc9\third_party\boost\1.48.0\include\boost\bind\bind.hpp(1200)
> > > >> : error C4430: missing type specifier - int assumed. Note: C++ does
> > not
> > > >> support default-int
>
> > [snip]
> >
> > > >>
> > > >> They point to this code in bind.hpp:
> > > >>
> > > >> BOOST_BIND_OPERATOR( ==, equal )
> >
> > [snip]
>
> Thanks for the help. I generated a preprocessed file for this translation
> unit (the one including bind.hpp) and I see the following generated code:
>
> struct equal { template<class V, class > bool operator()(V const & v,
> const & w) const { return v == w; } }; template<class R, class F, class L,
> class A2> bind_t< bool, equal, list2< bind_t<R, F, L>, typename
> add_value<A2>::type > > operator == (bind_t<R, F, L> const & f, A2 a2) {
> typedef typename add_value<A2>::type B2; typedef list2< bind_t<R, F, L>,
> B2> list_type; return bind_t<bool, equal, list_type> ( equal(),
> list_type(f, a2) ); }
>

Seems like the upper-case 'W' character is not being expanded properly. I'm
assuming you don't have anything crazy in your code base that defines 'W'
to be nothing?

Cheers,

Darren


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