Trying to compile the tutorials with gcc (4.7.2) results in errors like
/home/fugalh/tehcode/third-party/centos5.2-native/gcc/gcc-4.7.1/cc6c9dc/bin/g++ -std=gnu++11 -I../../include -o build/./insert_sorted.o -c insert_sorted.cpp
In file included from /mnt/gvfs/third-party/2abdfad61e1ced257651899c884f84346417ba37/centos5.2-native/gcc/gcc-4.7.1/cc6c9dc/bin/../lib/gcc/x86_64-redhat-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/move.h:57:0,
from /mnt/gvfs/third-party/2abdfad61e1ced257651899c884f84346417ba37/centos5.2-native/gcc/gcc-4.7.1/cc6c9dc/bin/../lib/gcc/x86_64-redhat-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/stl_pair.h:61,
from /mnt/gvfs/third-party/2abdfad61e1ced257651899c884f84346417ba37/centos5.2-native/gcc/gcc-4.7.1/cc6c9dc/bin/../lib/gcc/x86_64-redhat-linux-gnu/4.7.1/../../../../include/c++/4.7.1/utility:72,
from /mnt/gvfs/third-party/2abdfad61e1ced257651899c884f84346417ba37/centos5.2-native/gcc/gcc-4.7.1/cc6c9dc/bin/../lib/gcc/x86_64-redhat-linux-gnu/4.7.1/../../../../include/c++/4.7.1/algorithm:61,
from insert_sorted.cpp:1:
/mnt/gvfs/third-party/2abdfad61e1ced257651899c884f84346417ba37/centos5.2-native/gcc/gcc-4.7.1/cc6c9dc/bin/../lib/gcc/x86_64-redhat-linux-gnu/4.7.1/../../../../include/c++/4.7.1/type_traits: In instantiation of ‘struct std::_Result_of_impl<false, false, prop_insert_sorted_t, const int&, const std::vector<int, std::allocator<int> >&>’:
/mnt/gvfs/third-party/2abdfad61e1ced257651899c884f84346417ba37/centos5.2-native/gcc/gcc-4.7.1/cc6c9dc/bin/../lib/gcc/x86_64-redhat-linux-gnu/4.7.1/../../../../include/c++/4.7.1/type_traits:1857:12: required from ‘class std::result_of<prop_insert_sorted_t(const int&, const std::vector<int>&)>’
../../include/autocheck/apply.hpp:16:3: required by substitution of ‘template<class F, class ... Args> typename std::result_of<F(const Args& ...)>::type autocheck::apply(F, const std::tuple<_Elements ...>&) [with F = prop_insert_sorted_t; Args = {int, std::vector<int, std::allocator<int> >}]’
../../include/autocheck/check.hpp:48:7: required from ‘void autocheck::check(Property, size_t, Arbitrary, const autocheck::reporter&, autocheck::classifier<Args ...>, bool) [with Args = {int, std::vector<int, std::allocator<int> >}; Property = prop_insert_sorted_t; Arbitrary = autocheck::arbitrary<autocheck::generator<int, void>, autocheck::generator<std::vector<int, std::allocator<int> >, void> >; size_t = long unsigned int]’
insert_sorted.cpp:40:55: required from here
/mnt/gvfs/third-party/2abdfad61e1ced257651899c884f84346417ba37/centos5.2-native/gcc/gcc-4.7.1/cc6c9dc/bin/../lib/gcc/x86_64-redhat-linux-gnu/4.7.1/../../../../include/c++/4.7.1/type_traits:1834:9: error: no match for call to ‘(prop_insert_sorted_t) (const int&, const std::vector<int>&)’
insert_sorted.cpp:17:8: note: candidate is:
insert_sorted.cpp:19:8: note: template<class T> bool prop_insert_sorted_t::operator()(const T&, std::vector<_RealType>&)
insert_sorted.cpp:19:8: note: template argument deduction/substitution failed:
In file included from /mnt/gvfs/third-party/2abdfad61e1ced257651899c884f84346417ba37/centos5.2-native/gcc/gcc-4.7.1/cc6c9dc/bin/../lib/gcc/x86_64-redhat-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/move.h:57:0,
from /mnt/gvfs/third-party/2abdfad61e1ced257651899c884f84346417ba37/centos5.2-native/gcc/gcc-4.7.1/cc6c9dc/bin/../lib/gcc/x86_64-redhat-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/stl_pair.h:61,
from /mnt/gvfs/third-party/2abdfad61e1ced257651899c884f84346417ba37/centos5.2-native/gcc/gcc-4.7.1/cc6c9dc/bin/../lib/gcc/x86_64-redhat-linux-gnu/4.7.1/../../../../include/c++/4.7.1/utility:72,
from /mnt/gvfs/third-party/2abdfad61e1ced257651899c884f84346417ba37/centos5.2-native/gcc/gcc-4.7.1/cc6c9dc/bin/../lib/gcc/x86_64-redhat-linux-gnu/4.7.1/../../../../include/c++/4.7.1/algorithm:61,
from insert_sorted.cpp:1:
/mnt/gvfs/third-party/2abdfad61e1ced257651899c884f84346417ba37/centos5.2-native/gcc/gcc-4.7.1/cc6c9dc/bin/../lib/gcc/x86_64-redhat-linux-gnu/4.7.1/../../../../include/c++/4.7.1/type_traits:1834:9: note: types ‘std::vector<_RealType>’ and ‘const std::vector<int>’ have incompatible cv-qualifiers
‘
/mnt/gvfs/third-party/2abdfad61e1ced257651899c884f84346417ba37/centos5.2-native/gcc/gcc-4.7.1/cc6c9dc/bin/../lib/gcc/x86_64-redhat-linux-gnu/4.7.1/../../../../include/c++/4.7.1/type_traits:1834: confused by earlier errors, bailing out
make: *** [build/./insert_sorted.o] Error 1
When we changed out the const overload in apply.hpp (https://github.com/thejohnfreeman/autocheck/commit/fb2967d807a23522e46aa517b7e271a04cc58fc2) We get the cryptic message:
$ make
/home/fugalh/tehcode/third-party/centos5.2-native/gcc/gcc-4.7.1/cc6c9dc/bin/g++ -std=gnu++11 -I../../include -I/home/fugalh/local/include -I../../include -std=c++11 -o build/./insert_sorted.o -c insert_sorted.cpp
‘
../../include/autocheck/arbitrary.hpp:53: confused by earlier errors, bailing out
make: *** [build/./insert_sorted.o] Error 1