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

Boost 1.70.0 compile errors in VS2017 x86 /std:c++17 /clr #123

Open
codingdave opened this issue May 21, 2019 · 6 comments
Open

Boost 1.70.0 compile errors in VS2017 x86 /std:c++17 /clr #123

codingdave opened this issue May 21, 2019 · 6 comments

Comments

@codingdave
Copy link

Hi,

I get compiler errors when trying to compile with 32 bit and CLR using Visual Studio 2017:

libraries\boost\type_traits\detail\is_function_cxx_11.hpp(388): warning C4561: '__fastcall' incompatible with the '/clr' option: converting to '__stdcall'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(388): error C2953: 'boost::is_function<Ret(Args...) noexcept>': class template has already been defined
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(386): note: see declaration of 'boost::is_function<Ret(Args...) noexcept>'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(403): warning C4561: '__fastcall' incompatible with the '/clr' option: converting to '__stdcall'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(403): error C2953: 'boost::is_function<Ret(Args...) noexcept const>': class template has already been defined
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(401): note: see declaration of 'boost::is_function<Ret(Args...) noexcept const>'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(418): warning C4561: '__fastcall' incompatible with the '/clr' option: converting to '__stdcall'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(418): error C2953: 'boost::is_function<Ret(Args...) noexcept volatile>': class template has already been defined
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(416): note: see declaration of 'boost::is_function<Ret(Args...) noexcept volatile>'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(433): warning C4561: '__fastcall' incompatible with the '/clr' option: converting to '__stdcall'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(433): error C2953: 'boost::is_function<Ret(Args...) noexcept volatile const>': class template has already been defined
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(431): note: see declaration of 'boost::is_function<Ret(Args...) noexcept volatile const>'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(449): warning C4561: '__fastcall' incompatible with the '/clr' option: converting to '__stdcall'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(449): error C2953: 'boost::is_function<Ret(Args...) noexcept &>': class template has already been defined
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(447): note: see declaration of 'boost::is_function<Ret(Args...) noexcept &>'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(464): warning C4561: '__fastcall' incompatible with the '/clr' option: converting to '__stdcall'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(464): error C2953: 'boost::is_function<Ret(Args...) noexcept const &>': class template has already been defined
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(462): note: see declaration of 'boost::is_function<Ret(Args...) noexcept const &>'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(479): warning C4561: '__fastcall' incompatible with the '/clr' option: converting to '__stdcall'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(479): error C2953: 'boost::is_function<Ret(Args...) noexcept volatile &>': class template has already been defined
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(477): note: see declaration of 'boost::is_function<Ret(Args...) noexcept volatile &>'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(494): warning C4561: '__fastcall' incompatible with the '/clr' option: converting to '__stdcall'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(494): error C2953: 'boost::is_function<Ret(Args...) noexcept volatile const &>': class template has already been defined
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(492): note: see declaration of 'boost::is_function<Ret(Args...) noexcept volatile const &>'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(510): warning C4561: '__fastcall' incompatible with the '/clr' option: converting to '__stdcall'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(510): error C2953: 'boost::is_function<Ret(Args...) noexcept &&>': class template has already been defined
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(508): note: see declaration of 'boost::is_function<Ret(Args...) noexcept &&>'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(525): warning C4561: '__fastcall' incompatible with the '/clr' option: converting to '__stdcall'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(525): error C2953: 'boost::is_function<Ret(Args...) noexcept const &&>': class template has already been defined
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(523): note: see declaration of 'boost::is_function<Ret(Args...) noexcept const &&>'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(540): warning C4561: '__fastcall' incompatible with the '/clr' option: converting to '__stdcall'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(540): error C2953: 'boost::is_function<Ret(Args...) noexcept volatile &&>': class template has already been defined
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(538): note: see declaration of 'boost::is_function<Ret(Args...) noexcept volatile &&>'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(555): warning C4561: '__fastcall' incompatible with the '/clr' option: converting to '__stdcall'
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(555): error C2953: 'boost::is_function<Ret(Args...) noexcept volatile const &&>': class template has already been defined
libraries\boost\type_traits\detail\is_function_cxx_11.hpp(553): note: see declaration of 'boost::is_function<Ret(Args...) noexcept volatile const &&>'

@codingdave
Copy link
Author

The PR fixes the issue on my side.

@rcdailey
Copy link

rcdailey commented Jun 20, 2019

I can confirm this issue exists on vs2019 using boost version 1.70.0. The above patch (https://github.com/codingdave/type_traits/commit/ff1a2967b3ca68a6f8fb229c5ad9bc2cfbeb2852) does fix the issue for me.

@yoavmil
Copy link

yoavmil commented Oct 7, 2020

I have a similar issue. c++17, mcvs19, boost 1.73, x64.

include\boost\polygon\voronoi_builder.hpp(160,18): error C7626: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes

couldn't solve it. rolling back to c++14.

@glenfe
Copy link
Member

glenfe commented Oct 7, 2020

@yoavmil That issue in Boost.Polygon was fixed in develop but not merged to master for the 1.74 release: boostorg/polygon@5cfcb6c

I'll merge it for the 1.75 release.

@yoavmil
Copy link

yoavmil commented Oct 7, 2020

Great. thanks for the quick answer

@mw4853
Copy link

mw4853 commented Nov 30, 2020

The patch that @codingdave put up isn't quite correct. It will fix the issue for .NET Framework C++/CLI projects, but not for .NET Core C++/CLI projects.

See:
Issue: #148
PR: #149

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

5 participants