main2.cpp: In function 'int main()': main2.cpp:13:11: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string'} and 'std::string' {aka 'std::__cxx11::basic_string'}) 13 | cout << a - b << endl; | ~ ^ ~ | | | | | basic_string<[...]> | basic_string<[...]> In file included from /usr/include/c++/12/string:47, from /usr/include/c++/12/bitset:47, from cmpslib19.h:4, from main2.cpp:3: /usr/include/c++/12/bits/stl_iterator.h:621:5: note: candidate: 'template constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 621 | operator-(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/12/bits/stl_iterator.h:621:5: note: template argument deduction/substitution failed: main2.cpp:13:13: note: 'std::string' {aka 'std::__cxx11::basic_string'} is not derived from 'const std::reverse_iterator<_Iterator>' 13 | cout << a - b << endl; | ^ /usr/include/c++/12/bits/stl_iterator.h:1778:5: note: candidate: 'template constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1778 | operator-(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/12/bits/stl_iterator.h:1778:5: note: template argument deduction/substitution failed: main2.cpp:13:13: note: 'std::string' {aka 'std::__cxx11::basic_string'} is not derived from 'const std::move_iterator<_IteratorL>' 13 | cout << a - b << endl; | ^