-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
error: default initialization of an object of const type 'const ext::function<Real (Real)>' (aka 'const function<double (double)>') without a user-provided default constructor #1091
Comments
I'm a bit wary of saying it's a compiler problem, but it looks like it. May you try and see if this workaround fixes the issue?
|
This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks. |
That does get past that error. The next error I see is:
|
Try removing the |
The next error then is:
If I remove these It sounds like the compiler is suggesting that inserting |
Thanks! Leaving the Once it works, may you create a pull request with the changes? |
Hello, QuantLib 1.22 fails to build on OS X 10.11.6 using the compiler Apple LLVM version 8.0.0 (clang-800.0.42.1) that comes with Xcode 8.2.1:
Here's a full build log from the MacPorts buildbot system.
QuantLib claims to only require C++11, and Apple clang 500.2.75 and later are supposed to support C++11, and I am manually adding
-std=c++11
to CXXFLAGS to turn C++11 mode on (since the build system doesn't do it automatically), so I would expect this to work.Building on OS X 10.11.6 with open source clang 9.0.1 as installed by MacPorts works.
Building on macOS 10.12.6 with Apple LLVM version 9.0.0 (clang-900.0.39.2) from Xcode 9.2 works, as does Apple clang from newer Xcodes on newer macOS versions.
I'm not familiar with modern C++ so I wanted to report this in case maybe you are accidentally using C++ features that are from a later standard than C++11, or if this is a compiler bug then maybe there is something you could do to work around it.
The text was updated successfully, but these errors were encountered: