Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 5 years ago

Language

Compiler

Options

Author

anonymous

almost 5 years ago

$
In file included from /opt/wandbox/gcc-head/include/c++/11.0.0/algorithm:62,
                 from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::_List_iterator<int>; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/stl_algo.h:4837:18:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = std::_List_iterator<int>]'
prog.cc:8:35:   required from here
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/stl_algo.h:1955:22: error: no match for 'operator-' (operand types are 'std::_List_iterator<int>' and 'std::_List_iterator<int>')
 1955 |     std::__lg(__last - __first) * 2,
      |               ~~~~~~~^~~~~~~~~
In file included from /opt/wandbox/gcc-head/include/c++/11.0.0/bits/stl_algobase.h:67,
                 from /opt/wandbox/gcc-head/include/c++/11.0.0/algorithm:61,
                 from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/stl_iterator.h:501:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)'
  501 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/stl_iterator.h:501:5: note:   template argument deduction/substitution failed:
In file included from /opt/wandbox/gcc-head/include/c++/11.0.0/algorithm:62,
                 from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/stl_algo.h:1955:22: note:   'std::_List_iterator<int>' is not derived from 'const std::reverse_iterator<_Iterator>'
 1955 |     std::__lg(__last - __first) * 2,
      |               ~~~~~~~^~~~~~~~~
In file included from /opt/wandbox/gcc-head/include/c++/11.0.0/bits/stl_algobase.h:67,
                 from /opt/wandbox/gcc-head/include/c++/11.0.0/algorithm:61,
                 from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/stl_iterator.h:1542:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)'
 1542 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/stl_iterator.h:1542:5: note:   template argument deduction/substitution failed:
In file included from /opt/wandbox/gcc-head/include/c++/11.0.0/algorithm:62,
                 from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/stl_algo.h:1955:22: note:   'std::_List_iterator<int>' is not derived from 'const std::move_iterator<_IteratorL>'
 1955 |     std::__lg(__last - __first) * 2,
      |               ~~~~~~~^~~~~~~~~
Exit Code:
1