-
Notifications
You must be signed in to change notification settings - Fork 3
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
Please specify known good GCC/clang versions #1
Comments
I use gcc 5.1.1-4.fc22. Could you provide me with your error messages? Are you using --std=c++14? As mentioned in the notes, as it stands c++14 is required, although it could probably be adapted to use just c++11 without too much trouble (it'd probably take a few days of work, if people find it important) |
Yeah, I had some time in the meantime to figure out that it's related to C++14. That's not supported in these compiler versions. Specifically it's an STL issue (the first I looked into), i.e. std::map's ctor with just an allocator just doesn't exist in the shipped STL version. For inclusion into boost, I suspect (judging by http://beta.boost.org/development/tests/master/developer/summary.html ) that it'll have to be made C++11 compatible, too. Still, that clears up the question for me :) Compiler too old. $ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
(snip)
$ g++ -std=c++1y -o map_test map_test.cpp Produces In file included from map_test.cpp:6:0:
safemap.h: In instantiation of ‘safe::map<key_type, mapped_type, circular, iteration, destructor, Compare, Allocator>::map(const Allocator&) [with key_type = int; mapped_type = int; bool circular = false; safe::IterationType iteration = (safe::IterationType)0u; safe::DestructorSafetyType destructor = (safe::DestructorSafetyType)1u; Compare = std::less<int>; Allocator = std::allocator<std::pair<const int, safe::mapped<number::weak<int> > > >]’:
map_test.cpp:741:75: required from here
safemap.h:1091:28: error: no matching function for call to ‘std::map<int, safe::mapped<number::weak<int> >, std::less<int>, std::allocator<std::pair<const int, safe::mapped<number::weak<int> > > > >::map(const std::allocator<std::pair<const int, safe::mapped<number::weak<int> > > >&)’
m_lock(new mutex_type())
^
safemap.h:1091:28: note: candidates are:
In file included from /usr/include/c++/4.8/map:61:0,
from safemap.h:17,
from map_test.cpp:6:
/usr/include/c++/4.8/bits/stl_map.h:241:9: note: template<class _InputIterator> std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator, const _Compare&, const allocator_type&)
map(_InputIterator __first, _InputIterator __last,
^
/usr/include/c++/4.8/bits/stl_map.h:241:9: note: template argument deduction/substitution failed:
In file included from map_test.cpp:6:0:
safemap.h:1091:28: note: candidate expects 4 arguments, 1 provided
m_lock(new mutex_type())
^ |
I'm traveling right now, but if there's interest I'll work on "downgrading" the gcc requirements. :) |
From me, yes, but don't base everything on me. I basically move with LTS releases of OSes and their default package versions, for the most part. —Reply to this email directly or view it on GitHub. !DSPAM:1,56743b2530772286212951! |
I've finished "downgrading" it from c++14 to c++11, but I want to run it through tests for a day or two before I commit the changes. (changes mainly involved stripping down my number wrapper to its bare essentials and using the auto-decltype semantics; also, the latter made me have to limit operators like modulo in the number wrapper to only be defined for integers, which I didn't have to do in c++14) Once I commit the changes if you could confirm that it compiles and runs fine for you that would be great. :) |
No issues came up during test - I've updated the compilation instructions to reflect using C++11 instead of C++14. :) |
I know, it's technically not an implementation issue, just one for usage.
For example, the current long term stable release of Ubuntu ships with GCC 4.8.4 and Clang 3.6. Neither builds the test code.
I can provide error output if you want to fix this, but for now I'm mostly curious about the compiler version(s) that are working!
The text was updated successfully, but these errors were encountered: