Skip to content

Building v1.12.0 fails on macOS #723

@alebcay

Description

@alebcay

On macOS, building v1.12.0 (from Git checkout with submodules) using the compiler toolchain that Apple provides in its Command Line Tools fails with the following error:

clang++ -MMD -MP -I. -std=c++17 -Wextra -Wpedantic -Wall -O3 -DASIO_STANDALONE -DUSE_ROUTING=true -DNDEBUG -c structures/vroom/solution/step.cpp -o structures/vroom/solution/step.o
In file included from structures/vroom/input/input.cpp:10:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/mutex:190:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__mutex_base:15:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/system_error:149:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/string:511:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/string_view:179:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__string:57:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:725:71: error: invalid operands to binary expression ('const JobAmount' and 'const JobAmount')
    bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
                                                                  ~~~ ^ ~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4091:17: note: in instantiation of member function 'std::__less<JobAmount>::operator()' requested here
            if (__comp(*--__last, *__first))
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4272:12: note: in instantiation of function template specialization 'std::__sort<std::__less<JobAmount> &, JobAmount *>' requested here
    _VSTD::__sort<_Comp_ref>(__first, __last, _Comp_ref(__comp));
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4280:12: note: in instantiation of function template specialization 'std::sort<JobAmount *, std::__less<JobAmount>>' requested here
    _VSTD::sort(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4296:12: note: in instantiation of function template specialization 'std::sort<JobAmount *>' requested here
    _VSTD::sort(__first.base(), __last.base());
           ^
structures/vroom/input/input.cpp:593:12: note: in instantiation of function template specialization 'std::sort<JobAmount>' requested here
      std::sort(job_pickups_per_component[i].begin(),
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/utility:592:1: note: candidate template ignored: could not match 'pair<type-parameter-0-0, type-parameter-0-1>' against 'const JobAmount'
operator< (const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/iterator:811:1: note: candidate template ignored: could not match 'reverse_iterator<type-parameter-0-0>' against 'const JobAmount'
operator<(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/iterator:1267:1: note: candidate template ignored: could not match 'move_iterator<type-parameter-0-0>' against 'const JobAmount'
operator<(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/iterator:1639:1: note: candidate template ignored: could not match '__wrap_iter<type-parameter-0-0>' against 'const JobAmount'
operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/tuple:1220:1: note: candidate template ignored: could not match 'tuple<type-parameter-0-0...>' against 'const JobAmount'
operator<(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/memory:1953:1: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against 'const JobAmount'
operator< (const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/memory:2011:1: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against 'const JobAmount'
operator<(const unique_ptr<_T1, _D1>& __x, nullptr_t)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/memory:2020:1: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against 'const JobAmount'
operator<(nullptr_t, const unique_ptr<_T1, _D1>& __x)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/memory:3416:1: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-0>' against 'const JobAmount'
operator<(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/memory:3486:1: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-0>' against 'const JobAmount'
operator<(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/memory:3494:1: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-0>' against 'const JobAmount'
operator<(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
^
structures/vroom/input/input.cpp:575:12: note: candidate function not viable: 'this' argument has type 'const JobAmount', but method is not marked const
      bool operator<(const JobAmount& rhs) {
           ^
In file included from structures/vroom/input/input.cpp:10:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/mutex:190:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__mutex_base:15:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/system_error:149:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/string:511:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/string_view:179:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__string:57:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3877:20: error: no matching function for call to '__sort3'
    unsigned __r = _VSTD::__sort3<_Compare>(__x1, __x2, __x3, __c);
                   ^~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__config:856:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4098:20: note: in instantiation of function template specialization 'std::__sort4<std::__less<JobAmount> &, JobAmount *>' requested here
            _VSTD::__sort4<_Compare>(__first, __first+1, __first+2, --__last, __comp);
                   ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4272:12: note: in instantiation of function template specialization 'std::__sort<std::__less<JobAmount> &, JobAmount *>' requested here
    _VSTD::__sort<_Comp_ref>(__first, __last, _Comp_ref(__comp));
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4280:12: note: in instantiation of function template specialization 'std::sort<JobAmount *, std::__less<JobAmount>>' requested here
    _VSTD::sort(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4296:12: note: in instantiation of function template specialization 'std::sort<JobAmount *>' requested here
    _VSTD::sort(__first.base(), __last.base());
           ^
structures/vroom/input/input.cpp:593:12: note: in instantiation of function template specialization 'std::sort<JobAmount>' requested here
      std::sort(job_pickups_per_component[i].begin(),
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3837:1: note: candidate template ignored: substitution failure [with _Compare = std::__less<JobAmount> &, _ForwardIterator = JobAmount *]
__sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z, _Compare __c)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3904:20: error: no matching function for call to '__sort4'
    unsigned __r = _VSTD::__sort4<_Compare>(__x1, __x2, __x3, __x4, __c);
                   ^~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__config:856:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4101:20: note: in instantiation of function template specialization 'std::__sort5<std::__less<JobAmount> &, JobAmount *>' requested here
            _VSTD::__sort5<_Compare>(__first, __first+1, __first+2, __first+3, --__last, __comp);
                   ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4272:12: note: in instantiation of function template specialization 'std::__sort<std::__less<JobAmount> &, JobAmount *>' requested here
    _VSTD::__sort<_Comp_ref>(__first, __last, _Comp_ref(__comp));
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4280:12: note: in instantiation of function template specialization 'std::sort<JobAmount *, std::__less<JobAmount>>' requested here
    _VSTD::sort(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4296:12: note: in instantiation of function template specialization 'std::sort<JobAmount *>' requested here
    _VSTD::sort(__first.base(), __last.base());
           ^
structures/vroom/input/input.cpp:593:12: note: in instantiation of function template specialization 'std::sort<JobAmount>' requested here
      std::sort(job_pickups_per_component[i].begin(),
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3874:1: note: candidate template ignored: substitution failure [with _Compare = std::__less<JobAmount> &, _ForwardIterator = JobAmount *]
__sort4(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3,
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3969:5: error: no matching function for call to '__sort3'
    _VSTD::__sort3<_Compare>(__first, __first+1, __j, __comp);
    ^~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__config:856:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4106:20: note: in instantiation of function template specialization 'std::__insertion_sort_3<std::__less<JobAmount> &, JobAmount *>' requested here
            _VSTD::__insertion_sort_3<_Compare>(__first, __last, __comp);
                   ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4272:12: note: in instantiation of function template specialization 'std::__sort<std::__less<JobAmount> &, JobAmount *>' requested here
    _VSTD::__sort<_Comp_ref>(__first, __last, _Comp_ref(__comp));
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4280:12: note: in instantiation of function template specialization 'std::sort<JobAmount *, std::__less<JobAmount>>' requested here
    _VSTD::sort(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4296:12: note: in instantiation of function template specialization 'std::sort<JobAmount *>' requested here
    _VSTD::sort(__first.base(), __last.base());
           ^
structures/vroom/input/input.cpp:593:12: note: in instantiation of function template specialization 'std::sort<JobAmount>' requested here
      std::sort(job_pickups_per_component[i].begin(),
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3837:1: note: candidate template ignored: substitution failure [with _Compare = std::__less<JobAmount> &, _ForwardIterator = JobAmount *]
__sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z, _Compare __c)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4002:9: error: no matching function for call to '__sort3'
        _VSTD::__sort3<_Compare>(__first, __first+1, --__last, __comp);
        ^~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__config:856:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4232:32: note: in instantiation of function template specialization 'std::__insertion_sort_incomplete<std::__less<JobAmount> &, JobAmount *>' requested here
            bool __fs = _VSTD::__insertion_sort_incomplete<_Compare>(__first, __i, __comp);
                               ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4272:12: note: in instantiation of function template specialization 'std::__sort<std::__less<JobAmount> &, JobAmount *>' requested here
    _VSTD::__sort<_Comp_ref>(__first, __last, _Comp_ref(__comp));
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4280:12: note: in instantiation of function template specialization 'std::sort<JobAmount *, std::__less<JobAmount>>' requested here
    _VSTD::sort(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4296:12: note: in instantiation of function template specialization 'std::sort<JobAmount *>' requested here
    _VSTD::sort(__first.base(), __last.base());
           ^
structures/vroom/input/input.cpp:593:12: note: in instantiation of function template specialization 'std::sort<JobAmount>' requested here
      std::sort(job_pickups_per_component[i].begin(),
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3837:1: note: candidate template ignored: substitution failure [with _Compare = std::__less<JobAmount> &, _ForwardIterator = JobAmount *]
__sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z, _Compare __c)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4005:9: error: no matching function for call to '__sort4'
        _VSTD::__sort4<_Compare>(__first, __first+1, __first+2, --__last, __comp);
        ^~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__config:856:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3874:1: note: candidate template ignored: substitution failure [with _Compare = std::__less<JobAmount> &, _ForwardIterator = JobAmount *]
__sort4(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3,
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4008:9: error: no matching function for call to '__sort5'
        _VSTD::__sort5<_Compare>(__first, __first+1, __first+2, __first+3, --__last, __comp);
        ^~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__config:856:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3901:1: note: candidate template ignored: substitution failure [with _Compare = std::__less<JobAmount> &, _ForwardIterator = JobAmount *]
__sort5(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3,
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4013:5: error: no matching function for call to '__sort3'
    _VSTD::__sort3<_Compare>(__first, __first+1, __j, __comp);
    ^~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__config:856:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3837:1: note: candidate template ignored: substitution failure [with _Compare = std::__less<JobAmount> &, _ForwardIterator = JobAmount *]
__sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z, _Compare __c)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:725:71: error: invalid operands to binary expression ('const JobTime' and 'const JobTime')
    bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
                                                                  ~~~ ^ ~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4091:17: note: in instantiation of member function 'std::__less<JobTime>::operator()' requested here
            if (__comp(*--__last, *__first))
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4272:12: note: in instantiation of function template specialization 'std::__sort<std::__less<JobTime> &, JobTime *>' requested here
    _VSTD::__sort<_Comp_ref>(__first, __last, _Comp_ref(__comp));
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4280:12: note: in instantiation of function template specialization 'std::sort<JobTime *, std::__less<JobTime>>' requested here
    _VSTD::sort(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4296:12: note: in instantiation of function template specialization 'std::sort<JobTime *>' requested here
    _VSTD::sort(__first.base(), __last.base());
           ^
structures/vroom/input/input.cpp:650:10: note: in instantiation of function template specialization 'std::sort<JobTime>' requested here
    std::sort(job_times.begin(), job_times.end());
         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/utility:592:1: note: candidate template ignored: could not match 'pair<type-parameter-0-0, type-parameter-0-1>' against 'const JobTime'
operator< (const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/iterator:811:1: note: candidate template ignored: could not match 'reverse_iterator<type-parameter-0-0>' against 'const JobTime'
operator<(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/iterator:1267:1: note: candidate template ignored: could not match 'move_iterator<type-parameter-0-0>' against 'const JobTime'
operator<(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/iterator:1639:1: note: candidate template ignored: could not match '__wrap_iter<type-parameter-0-0>' against 'const JobTime'
operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/tuple:1220:1: note: candidate template ignored: could not match 'tuple<type-parameter-0-0...>' against 'const JobTime'
operator<(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/memory:1953:1: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against 'const JobTime'
operator< (const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/memory:2011:1: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against 'const JobTime'
operator<(const unique_ptr<_T1, _D1>& __x, nullptr_t)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/memory:2020:1: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against 'const JobTime'
operator<(nullptr_t, const unique_ptr<_T1, _D1>& __x)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/memory:3416:1: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-0>' against 'const JobTime'
operator<(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/memory:3486:1: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-0>' against 'const JobTime'
operator<(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/memory:3494:1: note: candidate template ignored: could not match 'shared_ptr<type-parameter-0-0>' against 'const JobTime'
operator<(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
^
structures/vroom/input/input.cpp:638:12: note: candidate function not viable: 'this' argument has type 'const JobTime', but method is not marked const
      bool operator<(const JobTime& rhs) {
           ^
In file included from structures/vroom/input/input.cpp:10:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/mutex:190:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__mutex_base:15:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/system_error:149:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/string:511:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/string_view:179:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__string:57:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3877:20: error: no matching function for call to '__sort3'
    unsigned __r = _VSTD::__sort3<_Compare>(__x1, __x2, __x3, __c);
                   ^~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__config:856:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4098:20: note: in instantiation of function template specialization 'std::__sort4<std::__less<JobTime> &, JobTime *>' requested here
            _VSTD::__sort4<_Compare>(__first, __first+1, __first+2, --__last, __comp);
                   ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4272:12: note: in instantiation of function template specialization 'std::__sort<std::__less<JobTime> &, JobTime *>' requested here
    _VSTD::__sort<_Comp_ref>(__first, __last, _Comp_ref(__comp));
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4280:12: note: in instantiation of function template specialization 'std::sort<JobTime *, std::__less<JobTime>>' requested here
    _VSTD::sort(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4296:12: note: in instantiation of function template specialization 'std::sort<JobTime *>' requested here
    _VSTD::sort(__first.base(), __last.base());
           ^
structures/vroom/input/input.cpp:650:10: note: in instantiation of function template specialization 'std::sort<JobTime>' requested here
    std::sort(job_times.begin(), job_times.end());
         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3837:1: note: candidate template ignored: substitution failure [with _Compare = std::__less<JobTime> &, _ForwardIterator = JobTime *]
__sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z, _Compare __c)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3904:20: error: no matching function for call to '__sort4'
    unsigned __r = _VSTD::__sort4<_Compare>(__x1, __x2, __x3, __x4, __c);
                   ^~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__config:856:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4101:20: note: in instantiation of function template specialization 'std::__sort5<std::__less<JobTime> &, JobTime *>' requested here
            _VSTD::__sort5<_Compare>(__first, __first+1, __first+2, __first+3, --__last, __comp);
                   ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4272:12: note: in instantiation of function template specialization 'std::__sort<std::__less<JobTime> &, JobTime *>' requested here
    _VSTD::__sort<_Comp_ref>(__first, __last, _Comp_ref(__comp));
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4280:12: note: in instantiation of function template specialization 'std::sort<JobTime *, std::__less<JobTime>>' requested here
    _VSTD::sort(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4296:12: note: in instantiation of function template specialization 'std::sort<JobTime *>' requested here
    _VSTD::sort(__first.base(), __last.base());
           ^
structures/vroom/input/input.cpp:650:10: note: in instantiation of function template specialization 'std::sort<JobTime>' requested here
    std::sort(job_times.begin(), job_times.end());
         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3874:1: note: candidate template ignored: substitution failure [with _Compare = std::__less<JobTime> &, _ForwardIterator = JobTime *]
__sort4(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3,
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3969:5: error: no matching function for call to '__sort3'
    _VSTD::__sort3<_Compare>(__first, __first+1, __j, __comp);
    ^~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__config:856:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4106:20: note: in instantiation of function template specialization 'std::__insertion_sort_3<std::__less<JobTime> &, JobTime *>' requested here
            _VSTD::__insertion_sort_3<_Compare>(__first, __last, __comp);
                   ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4272:12: note: in instantiation of function template specialization 'std::__sort<std::__less<JobTime> &, JobTime *>' requested here
    _VSTD::__sort<_Comp_ref>(__first, __last, _Comp_ref(__comp));
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4280:12: note: in instantiation of function template specialization 'std::sort<JobTime *, std::__less<JobTime>>' requested here
    _VSTD::sort(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4296:12: note: in instantiation of function template specialization 'std::sort<JobTime *>' requested here
    _VSTD::sort(__first.base(), __last.base());
           ^
structures/vroom/input/input.cpp:650:10: note: in instantiation of function template specialization 'std::sort<JobTime>' requested here
    std::sort(job_times.begin(), job_times.end());
         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3837:1: note: candidate template ignored: substitution failure [with _Compare = std::__less<JobTime> &, _ForwardIterator = JobTime *]
__sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z, _Compare __c)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4002:9: error: no matching function for call to '__sort3'
        _VSTD::__sort3<_Compare>(__first, __first+1, --__last, __comp);
        ^~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__config:856:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4232:32: note: in instantiation of function template specialization 'std::__insertion_sort_incomplete<std::__less<JobTime> &, JobTime *>' requested here
            bool __fs = _VSTD::__insertion_sort_incomplete<_Compare>(__first, __i, __comp);
                               ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4272:12: note: in instantiation of function template specialization 'std::__sort<std::__less<JobTime> &, JobTime *>' requested here
    _VSTD::__sort<_Comp_ref>(__first, __last, _Comp_ref(__comp));
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4280:12: note: in instantiation of function template specialization 'std::sort<JobTime *, std::__less<JobTime>>' requested here
    _VSTD::sort(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4296:12: note: in instantiation of function template specialization 'std::sort<JobTime *>' requested here
    _VSTD::sort(__first.base(), __last.base());
           ^
structures/vroom/input/input.cpp:650:10: note: in instantiation of function template specialization 'std::sort<JobTime>' requested here
    std::sort(job_times.begin(), job_times.end());
         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3837:1: note: candidate template ignored: substitution failure [with _Compare = std::__less<JobTime> &, _ForwardIterator = JobTime *]
__sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z, _Compare __c)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4005:9: error: no matching function for call to '__sort4'
        _VSTD::__sort4<_Compare>(__first, __first+1, __first+2, --__last, __comp);
        ^~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__config:856:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3874:1: note: candidate template ignored: substitution failure [with _Compare = std::__less<JobTime> &, _ForwardIterator = JobTime *]
__sort4(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3,
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4008:9: error: no matching function for call to '__sort5'
        _VSTD::__sort5<_Compare>(__first, __first+1, __first+2, __first+3, --__last, __comp);
        ^~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__config:856:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3901:1: note: candidate template ignored: substitution failure [with _Compare = std::__less<JobTime> &, _ForwardIterator = JobTime *]
__sort5(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3,
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:4013:5: error: no matching function for call to '__sort3'
    _VSTD::__sort3<_Compare>(__first, __first+1, __j, __comp);
    ^~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__config:856:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:3837:1: note: candidate template ignored: substitution failure [with _Compare = std::__less<JobTime> &, _ForwardIterator = JobTime *]
__sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z, _Compare __c)
^
16 errors generated.
make: *** [structures/vroom/input/input.o] Error 1
make: *** Waiting for unfinished jobs....

The error in its entirety is rather daunting; of interest is one particular note printed:

structures/vroom/input/input.cpp:575:12: note: candidate function not viable: 'this' argument has type 'const JobAmount', but method is not marked const
      bool operator<(const JobAmount& rhs) {
           ^

Upon changing the line to bool operator<(const JobAmount& rhs) const {, I still received another similar error, with another similar note:

structures/vroom/input/input.cpp:638:12: note: candidate function not viable: 'this' argument has type 'const JobTime', but method is not marked const
      bool operator<(const JobTime& rhs) {
           ^

Upon also changing this line to bool operator<(const JobTime& rhs) const {, the build succeeds. Building with this change on Linux with GCC 11 also seems to work without issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions