boostorg / boostorg/type_traits

Warning C4575 when compiled as a C++/CLI .Net Core project with Visual Studio 2019 v16.8

Open
#148 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
66
Forks
87
PR merge metrics
No merged PRs in 30d

Description

If you include a boost header (such as boost/algorithm/string.hpp) that ultimately includes is_funcion_cxx_11.hpp in a C++/CLI .NET Core (NOT the normal .NET Framework) project, you will see a series of compiler warnings similar to the following:

> boost-1.74\boost\type_traits\detail\is_function_cxx_11.hpp(114,4): warning C4575: '__vectorcall' incompatible with the '/clr' option: converting to '__stdcall'

https://github.com/boostorg/type_traits/blob/c6c7ff164789e7ca1d71745714cb27fae956360b/include/boost/type_traits/detail/is_function_cxx_11.hpp#L114

There is no warning here if the C++/CLI project is compiled as .NET Framework instead. It looks like __CLR_VER is defined when building as .NET Framework, but not when building as .NET Core?

How to convert your C++/CLI project to build as .NET Core (instead of the normal .NET Framework):
https://docs.microsoft.com/en-us/dotnet/core/porting/cpp-cli

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.