-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boost.Function and <boost/bind/apply.hpp> #53
Comments
That's a pretty annoying bug in MSVC; I thought it was no longer an issue in newer versions / later standard modes / You should report this to MS as a bug; in the meantime I'll try to figure out a way to avoid hitting it. |
I could think of nothing better than renaming the nested |
Thx. I am a bit reluctant to enter a bug reports since MS has quite the habit with closing them as not reproducible,; not important or not our fault. I tried to reproduce it in compiler explorer but it seems that you cannot use external libraries for the MSVC compiler (it works when using GCC). |
Recently updated to Boost 1.86 and VS2022 (x64) and we get a weird compilation error:
Error:
1>D:\Work Sdk\boost_1_86_0\boost\function\function_template.hpp(926,35): error C2977: 'boost::apply': too many template arguments
1>(compiling source file 'Boost.cpp')
1> D:\Work Sdk\boost_1_86_0\boost\bind\apply.hpp(17,26):
1> see declaration of 'boost::apply'
1> D:\Work Sdk\boost_1_86_0\boost\function\function_template.hpp(926,35):
1> the template instantiation context (the oldest one first) is
1> D:\Work\Src\Temp\Bla\Boost.cpp(13,34):
1> see reference to function template instantiation 'boost::function<int (int)>::function<boost::_bi::bind_t<int,int (__cdecl *)(int,double),boost::_bi::list<boost::arg<1>,boost::_bi::value>>>(Functor,int)' being compiled
1> with
1> [
1> T=double,
1> Functor=boost::_bi::bind_t<int,int (__cdecl *)(int,double),boost::_bi::list<boost::arg<1>,boost::_bi::value>>
1> ]
1> D:\Work\Src\Temp\Bla\Boost.cpp(13,34):
1> see the first reference to 'boost::function<int (int)>::function' in 'f'
1> D:\Work Sdk\boost_1_86_0\boost\function\function_template.hpp(1084,24):
1> see reference to function template instantiation 'boost::function_n<R,int>::function_n<boost::_bi::bind_t<R,int (__cdecl *)(int,double),boost::_bi::list<boost::arg<1>,boost::_bi::value>>>(Functor,int)' being compiled
1> with
1> [
1> R=int,
1> T=double,
1> Functor=boost::_bi::bind_t<int,int (__cdecl *)(int,double),boost::_bi::list<boost::arg<1>,boost::_bi::value>>
1> ]
1> D:\Work Sdk\boost_1_86_0\boost\function\function_template.hpp(757,13):
1> see reference to function template instantiation 'void boost::function_n<R,int>::assign_to<boost::_bi::bind_t<R,int (__cdecl *)(int,double),boost::_bi::list<boost::arg<1>,boost::_bi::value>>>(Functor)' being compiled
1> with
1> [
1> R=int,
1> T=double,
1> Functor=boost::_bi::bind_t<int,int (__cdecl *)(int,double),boost::_bi::list<boost::arg<1>,boost::_bi::value>>
1> ]
If one comments out the <boost/bind/apply.hpp>it compiles fine. Using auto or std::function also works.
The text was updated successfully, but these errors were encountered: