Advertisement
TimSenin

Untitled

Oct 4th, 2022
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.21 KB | None | 0 0
  1. CustomZipIterator(F first, S second) : iter_(first, second) {
  2.     }
  3.  
  4. // ^---- работает
  5.  
  6. CustomZipIterator(F first, S second) {
  7.     iter_.first = first;
  8.     iter_.second = second;
  9.     }
  10.  
  11. // ^---- не работает
  12.  
  13. error: no matching function for call to ‘std::pair<__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >, CustomRangeIterator>::pair()
  14.    61 |     CustomZipIterator(F first, S second) {
  15.       |                                          ^
  16.  
  17. note: candidate:template<class ... _Args1, long unsigned int ..._Indexes1, class ... _Args2, long unsigned int ..._Indexes2> constexpr std::pair<_T1, _T2>::pair(std::tuple<_Args1 ...>&, std::tuple<_Args2 ...>&, std::_Index_tuple<_Indexes1 ...>, std::_Index_tuple<_Indexes2 ...>) [with _Args1 = {_Args1 ...}; long unsigned int ..._Indexes1 = {_Indexes1 ...}; _Args2 = {_Args2 ...}; long unsigned int ..._Indexes2 = {_Indexes2 ...}; _T1 = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; _T2 = CustomRangeIterator]
  18.  
  19.   452 |         pair(tuple<_Args1...>&, tuple<_Args2...>&,
  20.       |         ^~~~
  21. /usr/include/c++/11/bits/stl_pair.h:452:9: note:   template argument deduction/substitution failed:
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement