| 1 |
intro1.cc: In instantiation of ‘Type add(const Type&, const Type&) [with Type = std::unordered_map<int, int>]’: |
| 2 |
intro1.cc:32:61: required from here |
| 3 |
intro1.cc:23:18: error: no match for ‘operator+’ (operand types are ‘const std::unordered_map<int, int>’ and ‘const std::unordered_map<int, int>’) |
| 4 |
return x + y; |
| 5 |
~~^~~ |
| 6 |
In file included from /usr/include/c++/8/bits/stl_algobase.h:67, |
| 7 |
from /usr/include/c++/8/bits/char_traits.h:39, |
| 8 |
from /usr/include/c++/8/ios:40, |
| 9 |
from /usr/include/c++/8/ostream:38, |
| 10 |
from /usr/include/c++/8/iostream:39, |
| 11 |
from intro1.cc:1: |
| 12 |
/usr/include/c++/8/bits/stl_iterator.h:400:5: note: candidate: ‘template<class _Iterator> constexpr std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, const std::reverse_iterator<_Iterator>&)’ |
| 13 |
operator+(typename reverse_iterator<_Iterator>::difference_type __n, |
| 14 |
^~~~~~~~ |
| 15 |
/usr/include/c++/8/bits/stl_iterator.h:400:5: note: template argument deduction/substitution failed: |
| 16 |
intro1.cc:23:18: note: ‘const std::unordered_map<int, int>’ is not derived from ‘const std::reverse_iterator<_Iterator>’ |
| 17 |
return x + y; |
| 18 |
~~^~~ |
| 19 |
In file included from /usr/include/c++/8/bits/stl_algobase.h:67, |
| 20 |
from /usr/include/c++/8/bits/char_traits.h:39, |
| 21 |
from /usr/include/c++/8/ios:40, |
| 22 |
from /usr/include/c++/8/ostream:38, |
| 23 |
from /usr/include/c++/8/iostream:39, |
| 24 |
from intro1.cc:1: |
| 25 |
/usr/include/c++/8/bits/stl_iterator.h:1195:5: note: candidate: ‘template<class _Iterator> constexpr std::move_iterator<_IteratorL> std::operator+(typename std::move_iterator<_IteratorL>::difference_type, const std::move_iterator<_IteratorL>&)’ |
| 26 |
operator+(typename move_iterator<_Iterator>::difference_type __n, |
| 27 |
^~~~~~~~ |
| 28 |
/usr/include/c++/8/bits/stl_iterator.h:1195:5: note: template argument deduction/substitution failed: |
| 29 |
intro1.cc:23:18: note: ‘const std::unordered_map<int, int>’ is not derived from ‘const std::move_iterator<_IteratorL>’ |
| 30 |
return x + y; |
| 31 |
~~^~~ |
| 32 |
In file included from /usr/include/c++/8/string:52, |
| 33 |
from /usr/include/c++/8/bits/locale_classes.h:40, |
| 34 |
from /usr/include/c++/8/bits/ios_base.h:41, |
| 35 |
from /usr/include/c++/8/ios:42, |
| 36 |
from /usr/include/c++/8/ostream:38, |
| 37 |
from /usr/include/c++/8/iostream:39, |
| 38 |
from intro1.cc:1: |
| 39 |
/usr/include/c++/8/bits/basic_string.h:5927:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)’ |
| 40 |
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, |
| 41 |
^~~~~~~~ |
| 42 |
/usr/include/c++/8/bits/basic_string.h:5927:5: note: template argument deduction/substitution failed: |
| 43 |
intro1.cc:23:18: note: ‘const std::unordered_map<int, int>’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’ |
| 44 |
return x + y; |
| 45 |
~~^~~ |
| 46 |
In file included from /usr/include/c++/8/string:53, |
| 47 |
from /usr/include/c++/8/bits/locale_classes.h:40, |
| 48 |
from /usr/include/c++/8/bits/ios_base.h:41, |
| 49 |
from /usr/include/c++/8/ios:42, |
| 50 |
from /usr/include/c++/8/ostream:38, |
| 51 |
from /usr/include/c++/8/iostream:39, |
| 52 |
from intro1.cc:1: |
| 53 |
/usr/include/c++/8/bits/basic_string.tcc:1157:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)’ |
| 54 |
operator+(const _CharT* __lhs, |
| 55 |
^~~~~~~~ |
| 56 |
/usr/include/c++/8/bits/basic_string.tcc:1157:5: note: template argument deduction/substitution failed: |
| 57 |
intro1.cc:23:18: note: mismatched types ‘const _CharT*’ and ‘std::unordered_map<int, int>’ |
| 58 |
return x + y; |
| 59 |
~~^~~ |
| 60 |
In file included from /usr/include/c++/8/string:53, |
| 61 |
from /usr/include/c++/8/bits/locale_classes.h:40, |
| 62 |
from /usr/include/c++/8/bits/ios_base.h:41, |
| 63 |
from /usr/include/c++/8/ios:42, |
| 64 |
from /usr/include/c++/8/ostream:38, |
| 65 |
from /usr/include/c++/8/iostream:39, |
| 66 |
from intro1.cc:1: |
| 67 |
/usr/include/c++/8/bits/basic_string.tcc:1173:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)’ |
| 68 |
operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) |
| 69 |
^~~~~~~~ |
| 70 |
/usr/include/c++/8/bits/basic_string.tcc:1173:5: note: template argument deduction/substitution failed: |
| 71 |
intro1.cc:23:18: note: ‘const std::unordered_map<int, int>’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’ |
| 72 |
return x + y; |
| 73 |
~~^~~ |
| 74 |
In file included from /usr/include/c++/8/string:52, |
| 75 |
from /usr/include/c++/8/bits/locale_classes.h:40, |
| 76 |
from /usr/include/c++/8/bits/ios_base.h:41, |
| 77 |
from /usr/include/c++/8/ios:42, |
| 78 |
from /usr/include/c++/8/ostream:38, |
| 79 |
from /usr/include/c++/8/iostream:39, |
| 80 |
from intro1.cc:1: |
| 81 |
/usr/include/c++/8/bits/basic_string.h:5964:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)’ |
| 82 |
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, |
| 83 |
^~~~~~~~ |
| 84 |
/usr/include/c++/8/bits/basic_string.h:5964:5: note: template argument deduction/substitution failed: |
| 85 |
intro1.cc:23:18: note: ‘const std::unordered_map<int, int>’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’ |
| 86 |
return x + y; |
| 87 |
~~^~~ |
| 88 |
In file included from /usr/include/c++/8/string:52, |
| 89 |
from /usr/include/c++/8/bits/locale_classes.h:40, |
| 90 |
from /usr/include/c++/8/bits/ios_base.h:41, |
| 91 |
from /usr/include/c++/8/ios:42, |
| 92 |
from /usr/include/c++/8/ostream:38, |
| 93 |
from /usr/include/c++/8/iostream:39, |
| 94 |
from intro1.cc:1: |
| 95 |
/usr/include/c++/8/bits/basic_string.h:5980:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)’ |
| 96 |
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) |
| 97 |
^~~~~~~~ |
| 98 |
/usr/include/c++/8/bits/basic_string.h:5980:5: note: template argument deduction/substitution failed: |
| 99 |
intro1.cc:23:18: note: ‘const std::unordered_map<int, int>’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’ |
| 100 |
return x + y; |
| 101 |
~~^~~ |
| 102 |
In file included from /usr/include/c++/8/string:52, |
| 103 |
from /usr/include/c++/8/bits/locale_classes.h:40, |
| 104 |
from /usr/include/c++/8/bits/ios_base.h:41, |
| 105 |
from /usr/include/c++/8/ios:42, |
| 106 |
from /usr/include/c++/8/ostream:38, |
| 107 |
from /usr/include/c++/8/iostream:39, |
| 108 |
from intro1.cc:1: |
| 109 |
/usr/include/c++/8/bits/basic_string.h:5992:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)’ |
| 110 |
operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, |
| 111 |
^~~~~~~~ |
| 112 |
/usr/include/c++/8/bits/basic_string.h:5992:5: note: template argument deduction/substitution failed: |
| 113 |
intro1.cc:23:18: note: types ‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’ and ‘const std::unordered_map<int, int>’ have incompatible cv-qualifiers |
| 114 |
return x + y; |
| 115 |
~~^~~ |
| 116 |
In file included from /usr/include/c++/8/string:52, |
| 117 |
from /usr/include/c++/8/bits/locale_classes.h:40, |
| 118 |
from /usr/include/c++/8/bits/ios_base.h:41, |
| 119 |
from /usr/include/c++/8/ios:42, |
| 120 |
from /usr/include/c++/8/ostream:38, |
| 121 |
from /usr/include/c++/8/iostream:39, |
| 122 |
from intro1.cc:1: |
| 123 |
/usr/include/c++/8/bits/basic_string.h:5998:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&)’ |
| 124 |
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, |
| 125 |
^~~~~~~~ |
| 126 |
/usr/include/c++/8/bits/basic_string.h:5998:5: note: template argument deduction/substitution failed: |
| 127 |
intro1.cc:23:18: note: ‘const std::unordered_map<int, int>’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’ |
| 128 |
return x + y; |
| 129 |
~~^~~ |
| 130 |
In file included from /usr/include/c++/8/string:52, |
| 131 |
from /usr/include/c++/8/bits/locale_classes.h:40, |
| 132 |
from /usr/include/c++/8/bits/ios_base.h:41, |
| 133 |
from /usr/include/c++/8/ios:42, |
| 134 |
from /usr/include/c++/8/ostream:38, |
| 135 |
from /usr/include/c++/8/iostream:39, |
| 136 |
from intro1.cc:1: |
| 137 |
/usr/include/c++/8/bits/basic_string.h:6004:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&)’ |
| 138 |
operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, |
| 139 |
^~~~~~~~ |
| 140 |
/usr/include/c++/8/bits/basic_string.h:6004:5: note: template argument deduction/substitution failed: |
| 141 |
intro1.cc:23:18: note: types ‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’ and ‘const std::unordered_map<int, int>’ have incompatible cv-qualifiers |
| 142 |
return x + y; |
| 143 |
~~^~~ |
| 144 |
In file included from /usr/include/c++/8/string:52, |
| 145 |
from /usr/include/c++/8/bits/locale_classes.h:40, |
| 146 |
from /usr/include/c++/8/bits/ios_base.h:41, |
| 147 |
from /usr/include/c++/8/ios:42, |
| 148 |
from /usr/include/c++/8/ostream:38, |
| 149 |
from /usr/include/c++/8/iostream:39, |
| 150 |
from intro1.cc:1: |
| 151 |
/usr/include/c++/8/bits/basic_string.h:6016:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&)’ |
| 152 |
operator+(const _CharT* __lhs, |
| 153 |
^~~~~~~~ |
| 154 |
/usr/include/c++/8/bits/basic_string.h:6016:5: note: template argument deduction/substitution failed: |
| 155 |
intro1.cc:23:18: note: mismatched types ‘const _CharT*’ and ‘std::unordered_map<int, int>’ |
| 156 |
return x + y; |
| 157 |
~~^~~ |
| 158 |
In file included from /usr/include/c++/8/string:52, |
| 159 |
from /usr/include/c++/8/bits/locale_classes.h:40, |
| 160 |
from /usr/include/c++/8/bits/ios_base.h:41, |
| 161 |
from /usr/include/c++/8/ios:42, |
| 162 |
from /usr/include/c++/8/ostream:38, |
| 163 |
from /usr/include/c++/8/iostream:39, |
| 164 |
from intro1.cc:1: |
| 165 |
/usr/include/c++/8/bits/basic_string.h:6022:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&)’ |
| 166 |
operator+(_CharT __lhs, |
| 167 |
^~~~~~~~ |
| 168 |
/usr/include/c++/8/bits/basic_string.h:6022:5: note: template argument deduction/substitution failed: |
| 169 |
intro1.cc:23:18: note: types ‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’ and ‘const std::unordered_map<int, int>’ have incompatible cv-qualifiers |
| 170 |
return x + y; |
| 171 |
~~^~~ |
| 172 |
In file included from /usr/include/c++/8/string:52, |
| 173 |
from /usr/include/c++/8/bits/locale_classes.h:40, |
| 174 |
from /usr/include/c++/8/bits/ios_base.h:41, |
| 175 |
from /usr/include/c++/8/ios:42, |
| 176 |
from /usr/include/c++/8/ostream:38, |
| 177 |
from /usr/include/c++/8/iostream:39, |
| 178 |
from intro1.cc:1: |
| 179 |
/usr/include/c++/8/bits/basic_string.h:6028:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const _CharT*)’ |
| 180 |
operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, |
| 181 |
^~~~~~~~ |
| 182 |
/usr/include/c++/8/bits/basic_string.h:6028:5: note: template argument deduction/substitution failed: |
| 183 |
intro1.cc:23:18: note: types ‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’ and ‘const std::unordered_map<int, int>’ have incompatible cv-qualifiers |
| 184 |
return x + y; |
| 185 |
~~^~~ |
| 186 |
In file included from /usr/include/c++/8/string:52, |
| 187 |
from /usr/include/c++/8/bits/locale_classes.h:40, |
| 188 |
from /usr/include/c++/8/bits/ios_base.h:41, |
| 189 |
from /usr/include/c++/8/ios:42, |
| 190 |
from /usr/include/c++/8/ostream:38, |
| 191 |
from /usr/include/c++/8/iostream:39, |
| 192 |
from intro1.cc:1: |
| 193 |
/usr/include/c++/8/bits/basic_string.h:6034:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, _CharT)’ |
| 194 |
operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, |
| 195 |
^~~~~~~~ |
| 196 |
/usr/include/c++/8/bits/basic_string.h:6034:5: note: template argument deduction/substitution failed: |
| 197 |
intro1.cc:23:18: note: types ‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’ and ‘const std::unordered_map<int, int>’ have incompatible cv-qualifiers |
| 198 |
return x + y; |
| 199 |
~~^~~ |
| 200 |
In file included from /usr/include/c++/8/vector:65, |
| 201 |
from intro1.cc:3: |
| 202 |
/usr/include/c++/8/bits/stl_bvector.h:299:3: note: candidate: ‘std::_Bit_iterator std::operator+(std::ptrdiff_t, const std::_Bit_iterator&)’ |
| 203 |
operator+(ptrdiff_t __n, const _Bit_iterator& __x) |
| 204 |
^~~~~~~~ |
| 205 |
/usr/include/c++/8/bits/stl_bvector.h:299:3: note: no known conversion for argument 1 from ‘const std::unordered_map<int, int>’ to ‘std::ptrdiff_t’ {aka ‘long int’} |
| 206 |
/usr/include/c++/8/bits/stl_bvector.h:389:3: note: candidate: ‘std::_Bit_const_iterator std::operator+(std::ptrdiff_t, const std::_Bit_const_iterator&)’ |
| 207 |
operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) |
| 208 |
^~~~~~~~ |
| 209 |
/usr/include/c++/8/bits/stl_bvector.h:389:3: note: no known conversion for argument 1 from ‘const std::unordered_map<int, int>’ to ‘std::ptrdiff_t’ {aka ‘long int’} |
| 210 |
In file included from /usr/include/c++/8/bits/stl_algobase.h:67, |
| 211 |
from /usr/include/c++/8/bits/char_traits.h:39, |
| 212 |
from /usr/include/c++/8/ios:40, |
| 213 |
from /usr/include/c++/8/ostream:38, |
| 214 |
from /usr/include/c++/8/iostream:39, |
| 215 |
from intro1.cc:1: |
| 216 |
/usr/include/c++/8/bits/stl_iterator.h:973:5: note: candidate: ‘template<class _Iterator, class _Container> __gnu_cxx::__normal_iterator<_Iterator, _Container> __gnu_cxx::operator+(typename __gnu_cxx::__normal_iterator<_Iterator, _Container>::difference_type, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)’ |
| 217 |
operator+(typename __normal_iterator<_Iterator, _Container>::difference_type |
| 218 |
^~~~~~~~ |
| 219 |
/usr/include/c++/8/bits/stl_iterator.h:973:5: note: template argument deduction/substitution failed: |
| 220 |
intro1.cc:23:18: note: ‘const std::unordered_map<int, int>’ is not derived from ‘const __gnu_cxx::__normal_iterator<_Iterator, _Container>’ |
| 221 |
return x + y; |
| 222 |
~~^~~ |