Skip to content
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

[msvc] boost bind failed due to error C2269 under x86 architecture #35

Closed
Zhaojun-Liu opened this issue Jul 9, 2024 · 1 comment
Closed

Comments

@Zhaojun-Liu
Copy link

Hi,
We use msvc to build boost and boost libs, and lib bind failed due to error C2269 under x86 architecture. Can you take a look? Thanks.

Repro steps:

  1. Open VS2022 x86 Native Tools command.
  2. Run command: cl bind_stdcall_mf_test.txt /TP /c /EHsc
  3. Run command: cl bind_fastcall_mf_test.txt /TP /c /EHsc

Expected: step 2 and 3 build ok.

Actual:
for step 2:

bind_stdcall_mf_test.i
.\boost/bind/bind.hpp(753): error C2269: cannot create a pointer or reference to a qualified function type (requires pointer-to-member)
.\boost/bind/bind.hpp(753): note: the template instantiation context (the oldest one first) is
libs\bind\test\bind_stdcall_mf_test.cpp(80): note: see reference to function template instantiation 'boost::_bi::bind_t<_bi::dm_result<MT::* ,A1>::type,boost::_mfi::dm<M,T>,_bi::list_av<A1>::type> boost::bind(M T::* ,A1)' being compiled
libs\bind\test\bind_stdcall_mf_test.cpp(80): note: see reference to class template instantiation 'boost::_bi::dm_result<int (__stdcall X::* )(void) const,X *>' being compiled
.\boost/bind/bind.hpp(795): note: see reference to class template instantiation 'boost::_bi::add_cref<Pm,1>' being compiled
        with
        [
            Pm=int (__stdcall X::* )(void) const
        ]

for step 3:

bind_fastcall_mf_test.i
.\boost/bind/bind.hpp(753): error C2269: cannot create a pointer or reference to a qualified function type (requires pointer-to-member)
.\boost/bind/bind.hpp(753): note: the template instantiation context (the oldest one first) is
libs\bind\test\bind_fastcall_mf_test.cpp(80): note: see reference to function template instantiation 'boost::_bi::bind_t<_bi::dm_result<MT::* ,A1>::type,boost::_mfi::dm<M,T>,_bi::list_av<A1>::type> boost::bind(M T::* ,A1)' being compiled
libs\bind\test\bind_fastcall_mf_test.cpp(80): note: see reference to class template instantiation 'boost::_bi::dm_result<void (__fastcall X::* )(void) const,X *>' being compiled
.\boost/bind/bind.hpp(803): note: see reference to class template instantiation 'boost::_bi::add_cref<Pm,1>' being compiled
        with
        [
            Pm=void (__fastcall X::* )(void) const
        ]

Note: This issue may be reproduced in the next released version of VS.

bind_fastcall_mf_test.txt
bind_stdcall_mf_test.txt

pdimov added a commit that referenced this issue Jul 9, 2024
@pdimov pdimov closed this as completed in 769479a Jul 9, 2024
@pdimov
Copy link
Member

pdimov commented Jul 10, 2024

Should be fixed by 769479a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants