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

Can't build with geometry.hpp in CLR project #1228

Closed
Sungjun4 opened this issue Jan 10, 2024 · 3 comments
Closed

Can't build with geometry.hpp in CLR project #1228

Sungjun4 opened this issue Jan 10, 2024 · 3 comments
Labels
not a bug Not a bug or a bug fixed in the past

Comments

@Sungjun4
Copy link

Visual Studio 2022(2019 as well)
ISO C++ 14, 17, 20
boost: 1.84.0, 1.81.0

I create a new project, CLR class Library(.NET Framework) or CLR console App(.Net Framework), and install the Boost NuGet package(1.84.0)

And include the boost header, even not adding any source code, just including headers.

And build a solution.

Followings are no problem to build

#include <boost/foreach.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/ptree_fwd.hpp>
#include <boost/geometry/arithmetic/cross_product.hpp>
#include <boost/geometry/geometries/geometries.hpp>

But if I add

#include <boost/geometry.hpp>

Then I got the error.

Error C1189 #error: "This library now requires a C++11 or later compiler - this message was generated as a result of BOOST_NO_CXX11_REF_QUALIFIERS being set"

Is this a bug? or do I need any setting for using geometry.hpp in CLR?

@Sungjun4
Copy link
Author

It is OK with 1.76.0 but error from the 1.77.0

@awulkiew
Copy link
Member

It seems that this error is generated by Boost.MultiPrecision:
https://github.com/boostorg/multiprecision/blob/develop/include/boost/multiprecision/detail/check_cpp11_config.hpp#L33
becasue BOOST_NO_CXX11_REF_QUALIFIERS is defined in Boost.Config probably somewhere in this file:
https://github.com/boostorg/config/blob/develop/include/boost/config/compiler/visualc.hpp
This macro is set when

The compiler does not support ref-qualifiers on member functions as described in N2439.

(see documentation)

So the question is, does the compiler support ref-qualifiers for member functions?
Here you can find some info and example code: https://akrzemi1.wordpress.com/2014/06/02/ref-qualifiers/
If it doesn't then the error is correct.
If it does then it's a bug in Boost.Config and should rather be reported there.

@barendgehrels barendgehrels added the not a bug Not a bug or a bug fixed in the past label Sep 30, 2024
@barendgehrels
Copy link
Collaborator

Closing as not a bug, and no response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not a bug Not a bug or a bug fixed in the past
Projects
None yet
Development

No branches or pull requests

3 participants