Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-06-10 06:02:57


Hello,
when I try to compiler the following code snippet on vc6 I get a lot of errors:

    #include <locale>
    #include <boost/bind.hpp>

    void aux(const std::codecvt<wchar_t, char, mbstate_t>& cvt)
    {
         boost::bind(boost::mem_fn(&std::codecvt<wchar_t, char, mbstate_t>::in),
                        &cvt,
                       _1, _2, _3, _4, _5, _6, _7);
    }

The errors are:
vc-C++ ..\..\..\bin\boost\libs\program_options\build\libboost_program_options.lib\msvc\debug\convert.obj
convert.cpp
H:\Work\boost-rc\libs\program_options\build\../src/convert.cpp(14) : error C2780: 'class boost::_bi::?$bind_t_at_ABVtemplate-parameter-BAB@V?$dm@$DBAB@$DBAC@@_mfi_at_boost@@V?$list1_at_V?$value@$DBAB@@_bi_at_boost@@@_bi_at_3@ __cdecl boost::bind(R T::*,A1)' : expects 2 arguments - 9 provided H:\Work\boost-rc\boost/bind.hpp(1487) : see declaration of 'bind'
H:\Work\boost-rc\libs\program_options\build\../src/convert.cpp(14) : error C2780: 'class boost::_bi::bind_t<R,struct boost::_mfi::cmf8<R,T,B1,B2,B3,B4,B5,B6,B7,B8>,class boost::_bi::list9<class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R> > > __cdecl boost::bind(R (__thiscall T::*)(B1,B2,B3,B4,B5,B6,B7,B8) const,A1,A2,A3,A4,A5,A6,A7,A8,A9)' : expects 10 arguments - 9 provided
        H:\Work\boost-rc\boost/bind/bind_mf_cc.hpp(223) : see declaration of 'bind'
H:\Work\boost-rc\libs\program_options\build\../src/convert.cpp(14) : error C2780: 'class boost::_bi::bind_t<R,struct boost::_mfi::mf8<R,T,B1,B2,B3,B4,B5,B6,B7,B8>,class boost::_bi::list9<class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R> > > __cdecl boost::bind(R (__thiscall T::*)(B1,B2,B3,B4,B5,B6,B7,B8),A1,A2,A3,A4,A5,A6,A7,A8,A9)' : expects 10 arguments - 9 provided
        H:\Work\boost-rc\boost/bind/bind_mf_cc.hpp(212) : see declaration of 'bind'
H:\Work\boost-rc\libs\program_options\build\../src/convert.cpp(14) : error C2784: 'class boost::_bi::bind_t<R,struct boost::_mfi::cmf7<R,T,B1,B2,B3,B4,B5,B6,B7>,class boost::_bi::list8<class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R> > > __cdecl boost::bind(R (__thiscall T::*)(B1,B2,B3,B4,B5,B6,B7) const,A1,A2,A3,A4,A5,A6,A7,A8)' : could not deduce template argument for '<Unknown>' from 'struct boost::_mfi::cmf7<int,class std::codecvt<unsigned short,char,int>,int &,char const *,char const *,char const * &,unsigned short *,unsigned short *,unsigned short * &>'
H:\Work\boost-rc\libs\program_options\build\../src/convert.cpp(14) : error C2784: 'class boost::_bi::bind_t<R,struct boost::_mfi::mf7<R,T,B1,B2,B3,B4,B5,B6,B7>,class boost::_bi::list8<class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R> > > __cdecl boost::bind(R (__thiscall T::*)(B1,B2,B3,B4,B5,B6,B7),A1,A2,A3,A4,A5,A6,A7,A8)' : could not deduce template argument for '<Unknown>' from 'struct boost::_mfi::cmf7<int,class std::codecvt<unsigned short,char,int>,int &,char const *,char const *,char const * &,unsigned short *,unsigned short *,unsigned short * &>'
H:\Work\boost-rc\libs\program_options\build\../src/convert.cpp(14) : error C2780: 'class boost::_bi::bind_t<R,struct boost::_mfi::cmf6<R,T,B1,B2,B3,B4,B5,B6>,class boost::_bi::list7<class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R> > > __cdecl boost::bind(R (__thiscall T::*)(B1,B2,B3,B4,B5,B6) const,A1,A2,A3,A4,A5,A6,A7)' : expects 8 arguments - 9 provided
        H:\Work\boost-rc\boost/bind/bind_mf_cc.hpp(175) : see declaration of 'bind'
H:\Work\boost-rc\libs\program_options\build\../src/convert.cpp(14) : error C2780: 'class boost::_bi::bind_t<R,struct boost::_mfi::mf6<R,T,B1,B2,B3,B4,B5,B6>,class boost::_bi::list7<class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R> > > __cdecl boost::bind(R (__thiscall T::*)(B1,B2,B3,B4,B5,B6),A1,A2,A3,A4,A5,A6,A7)' : expects 8 arguments - 9 provided
        H:\Work\boost-rc\boost/bind/bind_mf_cc.hpp(164) : see declaration of 'bind'
H:\Work\boost-rc\libs\program_options\build\../src/convert.cpp(14) : error C2780: 'class boost::_bi::bind_t<R,struct boost::_mfi::cmf5<R,T,B1,B2,B3,B4,B5>,class boost::_bi::list6<class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R>,class boost::_bi::value<R> > > __cdecl boost::bind(R (__thiscall T::*)(B1,B2,B3,B4,B5) const,A1,A2,A3,A4,A5,A6)' : expects 7 arguments - 9 provided
        H:\Work\boost-rc\boost/bind/bind_mf_cc.hpp(151) : see declaration of 'bind'

And so on. Any ideas what I can do to workaround this? The code itself works fine on every other compiler.

- Volodya


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