-
Notifications
You must be signed in to change notification settings - Fork 95
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
v0.3.0 build error: reference to 'allocator' is ambiguous #185
Comments
Thanks for reporting. ryml is tested successfully in macOS 11.6.2 with XCode 13.0.0. I'll setup a workflow to try to reproduce with XCode 12.0. |
Yes, the CI now shows this error as well (eg, this). Since I have no access to mac or xcode other than through the github workflows, and I cannot find what is the macro to test the xcode version, I'm going to require your help to fix this. The problem is in the header c4/std/vector_fwd.hpp. It seems that xcode 13 needs something like: namespace std {
template<typename> class allocator;
inline namespace __1 {
template<typename T, typename Alloc> class vector;
} // namespace __1 where as for xcode 12 namespace std {
inline namespace __1 {
template<typename> class allocator;
template<typename T, typename Alloc> class vector;
} // namespace __1 That is, the fixed header is going to be something like #if defined(__GLIBCXX__) || defined(__GLIBCPP__) || defined(_MSC_VER)
....
#elif defined(_LIBCPP_VERSION) || defined(__APPLE_CC__)
#if defined(__EMSCRIPTEN__)
namespace std {
template<typename> class allocator;
inline namespace __2 {
template<typename T, typename Alloc> class vector;
} // namespace __2
} // namespace std
#else
#if (xcode_version is >= 13) // <<<<<<<<< what is the macro for this???
namespace std {
template<typename> class allocator;
inline namespace __1 {
template<typename T, typename Alloc> class vector;
} // namespace __1
} // namespace std
#else
namespace std {
inline namespace __1 {
template<typename> class allocator;
template<typename T, typename Alloc> class vector;
} // namespace __1
} // namespace std
#endif
#else
#error "unknown standard library"
#endif So
|
I cannot find any reference to a macro to test the xcode version. It may be the case that |
My Development Env:
|
I build v0.3.0 src code on macOS 11.6:
mkdir build cmake -B build && make -C build
Then I get the following error:
The text was updated successfully, but these errors were encountered: