Boost logo

Boost :

Subject: [boost] [factory][bind] C2664 with MSVC 2015 & 1.63
From: Jens Weller (JensWeller_at_[hidden])
Date: 2017-02-01 05:35:41


Hello Boost,

I'm having this Problem: http://lists.boost.org/boost-users/2015/04/84176.php

That message already describes pretty much what I see, except that I use 1.63 and the latest 2015 VC++.

Errormessage:
D:\cpp\libraries\boost_1_63_0\boost\bind\bind.hpp:388: error: C2664: 'ListsModuleWidget *boost::factory<ListsModuleWidget *,void,boost::factory_alloc_for_pointee_and_deleter>::operator ()(void) const': cannot convert argument 1 from 'Module *' to 'Module *&'

bind.hpp code:
> template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
> {
> >>this line return unwrapper<F>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]);
> }

Compiler says:

..\..\..\..\cpp\libraries\boost_1_63_0\boost/bind/bind.hpp(388): error C2664: 'ListsModuleWidget *boost::factory<ListsModuleWidget *,void,boost::factory_alloc_for_pointee_and_deleter>::operator ()(void) const': cannot convert argument 1 from 'Module *' to 'Module *&'
..\..\..\..\cpp\libraries\boost_1_63_0\boost/bind/bind.hpp(1342): note: see reference to function template instantiation 'R *boost::_bi::list3<boost::arg<1>,boost::arg<2>,boost::arg<3>>::operator ()<ListsModuleWidget*,F,boost::_bi::rrlist4<A1,A2,A3,A4>>(boost::_bi::type<ListsModuleWidget *>,F &,A &,long)' being compiled
        with
        [
            R=ListsModuleWidget *,
            F=boost::factory<ListsModuleWidget *,void,boost::factory_alloc_for_pointee_and_deleter>,
            A1=Module *,
            A2=const QString &,
            A3=const QString &,
            A4=QWidget *,
            A=boost::_bi::rrlist4<Module *,const QString &,const QString &,QWidget *>
        ]

cheers,

Jens Weller


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