Closed SPlatten closed 3 years ago
What is the code that fails? Is this a regression, that is, did this same code work with an earlier version of Boost?
From a clean build this is the output, hopefully if gives you the information you are after? `------ Rebuild All started: Project: Process Control Service Group, Configuration: Debug Win32 ------ Recording build details "Built: 06/08/2020 12:50:17 (HW-WOP-113835:U49100)"
entry.cpp
process.cpp
processcontrolengine.cpp
processscope.cpp
c:\boost\boost_1_73_0\boost\bind\mem_fn_template.hpp(271): error C2672: 'get_pointer': no matching overloaded function found
c:\boost\boost_1_73_0\boost\bind\mem_fn_template.hpp(286): note: see reference to function template instantiation 'R boost::_mfi::mf2<R,IProcessChangeObserver,SystemObjectPtrRef,ProcessControl::ProcessChange>::call<U,const SystemObjectPtr,A2>(U &,const void ,B1 &,B2 &) const' being compiled
with
[
R=void,
U=std::_Ph<,
A2=ProcessControl::ProcessChange,
B1=const SystemObjectPtr,
B2=ProcessControl::ProcessChange
]
c:\boost\boost_1_73_0\boost\bind\mem_fn_template.hpp(286): note: see reference to function template instantiation 'R boost::_mfi::mf2<R,IProcessChangeObserver,SystemObjectPtrRef,ProcessControl::ProcessChange>::call<U,const SystemObjectPtr,A2>(U &,const void ,B1 &,B2 &) const' being compiled
with
[
R=void,
U=std::_Ph<,
A2=ProcessControl::ProcessChange,
B1=const SystemObjectPtr,
B2=ProcessControl::ProcessChange
]
c:\boost\boost_1_73_0\boost\bind\bind.hpp(398): note: see reference to function template instantiation 'R boost::_mfi::mf2<R,IProcessChangeObserver,SystemObjectPtrRef,ProcessControl::ProcessChange>::operator ()
This doesn't really answer any of my questions, but I can now see what's the reason for the error - the placeholder _1
refers to the standard std::placeholders::_1
, rather than to the Boost one, boost::placeholders::_1
.
Excellent, thank you, no more problem.
Sorry, hate to tag on to another post but I get a similar error with boost 1.7.5. Here's my Visual Studio error train:
Rebuild started...
1>------ Rebuild All started: Project: fem1d, Configuration: Debug Win32 ------
1>main.cpp
1>C:\Projects\Insitu\fem1d\1d-fem\fem1d\geolib\ElementHM.ipp(459,25): warning C4018: '<': signed/unsigned mismatch
1>C:\Projects\Insitu\fem1d\1d-fem\fem1d\geolib\ElementHM.ipp(463,27): warning C4018: '<': signed/unsigned mismatch
1>C:\Projects\Insitu\fem1d\1d-fem\fem1d\geolib\ElementHM.ipp(472,25): warning C4018: '<': signed/unsigned mismatch
1>C:\Projects\Insitu\fem1d\1d-fem\fem1d\geolib\ElementHM.ipp(473,27): warning C4018: '<': signed/unsigned mismatch
1>C:\Projects\Insitu\fem1d\1d-fem\fem1d\geolib\ElementHM.ipp(503,25): warning C4018: '<': signed/unsigned mismatch
1>C:\Projects\Insitu\fem1d\1d-fem\fem1d\geolib\ElementHM.ipp(504,27): warning C4018: '<': signed/unsigned mismatch
1>C:\Projects\Insitu\fem1d\1d-fem\fem1d\geolib\ElementHM.ipp(705,25): warning C4018: '<': signed/unsigned mismatch
1>C:\Projects\Insitu\fem1d\1d-fem\fem1d\geolib\ElementHM.ipp(713,27): warning C4018: '<': signed/unsigned mismatch
1>C:\Projects\Insitu\fem1d\1d-fem\fem1d\geolib\ElementHM.ipp(750,27): warning C4018: '<': signed/unsigned mismatch
1>C:\Projects\Insitu\fem1d\1d-fem\fem1d\geolib\ElementHM.ipp(758,27): warning C4018: '<': signed/unsigned mismatch
1>C:\Projects\Insitu\fem1d\1d-fem\fem1d\geolib\ElementHM.ipp(769,27): warning C4018: '<': signed/unsigned mismatch
1>C:\Projects\Insitu\fem1d\1d-fem\fem1d\geolib\ElementHM.ipp(1005,29): warning C4018: '<': signed/unsigned mismatch
1>C:\Projects\Insitu\fem1d\1d-fem\fem1d\geolib\ElementHM.ipp(1013,31): warning C4018: '<': signed/unsigned mismatch
1>C:\Projects\Insitu\fem1d\1d-fem\fem1d\geolib\ElementHM.ipp(1035,29): warning C4018: '<': signed/unsigned mismatch
1>C:\local\boost_1_75_0\boost\bind\mem_fn_template.hpp(40,30): error C2672: 'get_pointer': no matching overloaded function found
1>C:\local\boost_1_75_0\boost\bind\mem_fn_template.hpp(55): message : see reference to function template instantiation 'R boost::_mfi::mf0<R,plasticity::fem::NodeStatic>::call(U &,const void ) const' being compiled
1> with
1> [
1> R=void,
1> U=std::_Ph<1>
1> ]
1>C:\local\boost_1_75_0\boost\bind\mem_fn_template.hpp(55): message : see reference to function template instantiation 'R boost::_mfi::mf0<R,plasticity::fem::NodeStatic>::call(U &,const void ) const' being compiled
1> with
1> [
1> R=void,
1> U=std::_Ph<1>
1> ]
1>C:\local\boost_1_75_0\boost\bind\bind.hpp(237): message : see reference to function template instantiation 'R boost::_mfi::mf0<R,plasticity::fem::NodeStatic>::operator ()
The cause of the error is the same: you're passing the standard _1 from namespace std::placeholders to boost::bind.
1> _Fn=boost::_bi::bind_t<void,boost::_mfi::mf0<void,plasticity::fem::NodeStatic>,boost::_bi::list1<boost::_bi::value<std::_Ph<1>>>>,
I suppose I need to just make this work.
Thank you. I was trying to build some software we got from a 3rd party. I got past the compile errors only to get into boost library linking issues. There's some magic happening where Visual Studio knows the names of the boost libraries (including boost version) without me telling it. I think I will throw the project back over the wall and concede defeat.
From: Peter Dimov [mailto:notifications@github.com] Sent: February 23, 2021 10:51 AM To: boostorg/bind Cc: SSStevePye; Comment Subject: Re: [boostorg/bind] error C2672 'get_pointer': no matching overloaded function found (#22)
The cause of the error is the same: you're passing the standard _1 from namespace std::placeholders to boost::bind.
1> _Fn=boost::_bi::bind_t<void,boost::_mfi::mf0<void,plasticity::fem::NodeStati c>,boost::_bi::list1<boost::_bi::value<std::_Ph<1>>>>,
I suppose I need to just make this work.
- You are receiving this because you commented. Reply to this email directly, view it https://github.com/boostorg/bind/issues/22#issuecomment-784385225 on GitHub, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGLVYHYCZP6WLJFGWD5YIR3TA PTHVANCNFSM4PWOHLXQ . https://github.com/notifications/beacon/AGLVYH2R7EBXZYDZXVOVRRLTAPTHVA5CNFS M4PWOHLX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOF3AMJSI .gif
The autolink magic is documented here: https://www.boost.org/doc/libs/1_75_0/libs/config/doc/html/boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.macros_for_libraries_with_separate_source_code.automatic_library_selection
In particular, defining BOOST_ALL_NO_LIB disables it.
Added support for using the standard placeholders in https://github.com/boostorg/bind/commit/c85b31e3d200dda2a73cf0027a82c6d8e29066f8.
Sorry to bother you. @pdimov
I encountered the same issue. In the past comment, you said can pass the standard _1 from namespace std::placeholders to boost::bind.
Could you tell me where could I change Define namespace ?
I tried to declare the namespace in bind.hpp, but it still showed the error.
Thanks for your reading.
OS : Windows 10 Boost versoin : 1.6.6
What code are you trying to compile, and what are the errors you are getting?
I'm using Boost 1.73 the error is reported in:
c:\boost\boost_1_73_0\boost\bind\mem_fn_template.hpp(271): error C2672: 'get_pointer': no matching overloaded function found c:\boost\boost_1_73_0\boost\bind\mem_fn_template.hpp(286): note: see reference to function template instantiation 'R boost::_mfi::mf2<R,IProcessChangeObserver,SystemObjectPtrRef,ProcessControl::ProcessChange>::call<U,const SystemObjectPtr,A2>(U &,const void *,B1 &,B2 &) const' being compiled with [ R=void, U=std::_Ph<1>, A2=ProcessControl::ProcessChange, B1=const SystemObjectPtr, B2=ProcessControl::ProcessChange ] c:\boost\boost_1_73_0\boost\bind\mem_fn_template.hpp(286): note: see reference to function template instantiation 'R boost::_mfi::mf2<R,IProcessChangeObserver,SystemObjectPtrRef,ProcessControl::ProcessChange>::call<U,const SystemObjectPtr,A2>(U &,const void *,B1 &,B2 &) const' being compiled with [ R=void, U=std::_Ph<1>, A2=ProcessControl::ProcessChange, B1=const SystemObjectPtr, B2=ProcessControl::ProcessChange ] c:\boost\boost_1_73_0\boost\bind\bind.hpp(398): note: see reference to function template instantiation 'R boost::_mfi::mf2<R,IProcessChangeObserver,SystemObjectPtrRef,ProcessControl::ProcessChange>::operator ()<T>(U &,A1,A2) const' being compiled with [ R=void, T=std::_Ph<1>, U=std::_Ph<1>, A1=SystemObjectPtrRef, A2=ProcessControl::ProcessChange ] c:\boost\boost_1_73_0\boost\bind\bind.hpp(398): note: see reference to function template instantiation 'R boost::_mfi::mf2<R,IProcessChangeObserver,SystemObjectPtrRef,ProcessControl::ProcessChange>::operator ()<T>(U &,A1,A2) const' being compiled with [ R=void, T=std::_Ph<1>, U=std::_Ph<1>, A1=SystemObjectPtrRef, A2=ProcessControl::ProcessChange ] c:\boost\boost_1_73_0\boost\bind\bind.hpp(1306): note: see reference to function template instantiation 'void boost::_bi::list3<boost::_bi::value<T>,boost::_bi::value<boost::shared_ptr<ISystemObject>>,boost::_bi::value<ProcessControl::ProcessChange>>::operator ()<F,boost::_bi::rrlist1<A1>>(boost::_bi::type<void>,F &,A &,int)' being compiled with [ T=std::_Ph<1>, F=boost::_mfi::mf2<void,IProcessChangeObserver,SystemObjectPtrRef,ProcessControl::ProcessChange>, A1=const boost::intrusive_ptr<IProcessChangeObserver> &, A=boost::_bi::rrlist1<const boost::intrusive_ptr<IProcessChangeObserver> &> ] c:\boost\boost_1_73_0\boost\bind\bind.hpp(1306): note: see reference to function template instantiation 'void boost::_bi::list3<boost::_bi::value<T>,boost::_bi::value<boost::shared_ptr<ISystemObject>>,boost::_bi::value<ProcessControl::ProcessChange>>::operator ()<F,boost::_bi::rrlist1<A1>>(boost::_bi::type<void>,F &,A &,int)' being compiled with [ T=std::_Ph<1>, F=boost::_mfi::mf2<void,IProcessChangeObserver,SystemObjectPtrRef,ProcessControl::ProcessChange>, A1=const boost::intrusive_ptr<IProcessChangeObserver> &, A=boost::_bi::rrlist1<const boost::intrusive_ptr<IProcessChangeObserver> &> ] c:\program files (x86)\microsoft visual studio\2017\enterprise\vc\tools\msvc\14.16.27023\include\algorithm(92): note: see reference to function template instantiation 'void boost::_bi::bind_t<void,boost::_mfi::mf2<void,IProcessChangeObserver,SystemObjectPtrRef,ProcessControl::ProcessChange>,boost::_bi::list3<boost::_bi::value<T>,boost::_bi::value<boost::shared_ptr<ISystemObject>>,boost::_bi::value<ProcessControl::ProcessChange>>>::operator ()<const boost::intrusive_ptr<IProcessChangeObserver>&>(A1)' being compiled with [ T=std::_Ph<1>, A1=const boost::intrusive_ptr<IProcessChangeObserver> & ] c:\program files (x86)\microsoft visual studio\2017\enterprise\vc\tools\msvc\14.16.27023\include\algorithm(92): note: see reference to function template instantiation 'void boost::_bi::bind_t<void,boost::_mfi::mf2<void,IProcessChangeObserver,SystemObjectPtrRef,ProcessControl::ProcessChange>,boost::_bi::list3<boost::_bi::value<T>,boost::_bi::value<boost::shared_ptr<ISystemObject>>,boost::_bi::value<ProcessControl::ProcessChange>>>::operator ()<const boost::intrusive_ptr<IProcessChangeObserver>&>(A1)' being compiled with [ T=std::_Ph<1>, A1=const boost::intrusive_ptr<IProcessChangeObserver> & ]