Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lol.cpp: In function ‘std::string rev(const string&)’:
- lol.cpp:23:22: error: could not convert ‘std::accumulate<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::vector<std::basic_string<char> > >, rev(const string&)::__lambda0>(words.std::vector<_Tp, _Alloc>::begin<std::basic_string<char>, std::allocator<std::basic_string<char> > >(), words.std::vector<_Tp, _Alloc>::end<std::basic_string<char>, std::allocator<std::basic_string<char> > >(), (<lambda closure object>rev(const string&)::__lambda0{}, rev(const string&)::__lambda0()))’ from ‘rev(const string&)::__lambda0’ to ‘std::string {aka std::basic_string<char>}’
- });
- ^
- In file included from /usr/include/c++/4.8/numeric:62:0,
- from /usr/include/c++/4.8/bits/random.tcc:33,
- from /usr/include/c++/4.8/random:52,
- from /usr/include/c++/4.8/bits/stl_algo.h:65,
- from /usr/include/c++/4.8/algorithm:62,
- from lol.cpp:3:
- /usr/include/c++/4.8/bits/stl_numeric.h: In instantiation of ‘_Tp std::accumulate(_InputIterator, _InputIterator, _Tp) [with _InputIterator = __gnu_cxx::__normal_iterator<std::basic_string<char>*, std::vector<std::basic_string<char> > >; _Tp = rev(const string&)::__lambda0]’:
- lol.cpp:23:22: required from here
- /usr/include/c++/4.8/bits/stl_numeric.h:127:18: error: no match for ‘operator+’ (operand types are ‘rev(const string&)::__lambda0’ and ‘std::basic_string<char>’)
- __init = __init + *__first;
- ^
- /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note: candidates are:
- In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
- from /usr/include/c++/4.8/vector:60,
- from lol.cpp:1:
- /usr/include/c++/4.8/bits/stl_iterator.h:333:5: note: template<class _Iterator> std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, const std::reverse_iterator<_Iterator>&)
- operator+(typename reverse_iterator<_Iterator>::difference_type __n,
- ^
- /usr/include/c++/4.8/bits/stl_iterator.h:333:5: note: template argument deduction/substitution failed:
- In file included from /usr/include/c++/4.8/numeric:62:0,
- from /usr/include/c++/4.8/bits/random.tcc:33,
- from /usr/include/c++/4.8/random:52,
- from /usr/include/c++/4.8/bits/stl_algo.h:65,
- from /usr/include/c++/4.8/algorithm:62,
- from lol.cpp:3:
- /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note: ‘std::basic_string<char>’ is not derived from ‘const std::reverse_iterator<_Iterator>’
- __init = __init + *__first;
- ^
- In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
- from /usr/include/c++/4.8/vector:60,
- from lol.cpp:1:
- /usr/include/c++/4.8/bits/stl_iterator.h:1118:5: note: template<class _Iterator> std::move_iterator<_Iterator> std::operator+(typename std::move_iterator<_Iterator>::difference_type, const std::move_iterator<_Iterator>&)
- operator+(typename move_iterator<_Iterator>::difference_type __n,
- ^
- /usr/include/c++/4.8/bits/stl_iterator.h:1118:5: note: template argument deduction/substitution failed:
- In file included from /usr/include/c++/4.8/numeric:62:0,
- from /usr/include/c++/4.8/bits/random.tcc:33,
- from /usr/include/c++/4.8/random:52,
- from /usr/include/c++/4.8/bits/stl_algo.h:65,
- from /usr/include/c++/4.8/algorithm:62,
- from lol.cpp:3:
- /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note: ‘std::basic_string<char>’ is not derived from ‘const std::move_iterator<_Iterator>’
- __init = __init + *__first;
- ^
- In file included from /usr/include/c++/4.8/vector:65:0,
- from lol.cpp:1:
- /usr/include/c++/4.8/bits/stl_bvector.h:293:3: note: std::_Bit_iterator std::operator+(std::ptrdiff_t, const std::_Bit_iterator&)
- operator+(ptrdiff_t __n, const _Bit_iterator& __x)
- ^
- /usr/include/c++/4.8/bits/stl_bvector.h:293:3: note: no known conversion for argument 2 from ‘std::basic_string<char>’ to ‘const std::_Bit_iterator&’
- /usr/include/c++/4.8/bits/stl_bvector.h:379:3: note: std::_Bit_const_iterator std::operator+(std::ptrdiff_t, const std::_Bit_const_iterator&)
- operator+(ptrdiff_t __n, const _Bit_const_iterator& __x)
- ^
- /usr/include/c++/4.8/bits/stl_bvector.h:379:3: note: no known conversion for argument 2 from ‘std::basic_string<char>’ to ‘const std::_Bit_const_iterator&’
- In file included from /usr/include/c++/4.8/string:52:0,
- from lol.cpp:2:
- /usr/include/c++/4.8/bits/basic_string.h:2365:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
- operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
- ^
- /usr/include/c++/4.8/bits/basic_string.h:2365:5: note: template argument deduction/substitution failed:
- In file included from /usr/include/c++/4.8/numeric:62:0,
- from /usr/include/c++/4.8/bits/random.tcc:33,
- from /usr/include/c++/4.8/random:52,
- from /usr/include/c++/4.8/bits/stl_algo.h:65,
- from /usr/include/c++/4.8/algorithm:62,
- from lol.cpp:3:
- /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note: ‘rev(const string&)::__lambda0’ is not derived from ‘const std::basic_string<_CharT, _Traits, _Alloc>’
- __init = __init + *__first;
- ^
- In file included from /usr/include/c++/4.8/string:53:0,
- from lol.cpp:2:
- /usr/include/c++/4.8/bits/basic_string.tcc:692:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_string<_CharT, _Traits, _Alloc> std::operator+(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
- operator+(const _CharT* __lhs,
- ^
- /usr/include/c++/4.8/bits/basic_string.tcc:692:5: note: template argument deduction/substitution failed:
- In file included from /usr/include/c++/4.8/numeric:62:0,
- from /usr/include/c++/4.8/bits/random.tcc:33,
- from /usr/include/c++/4.8/random:52,
- from /usr/include/c++/4.8/bits/stl_algo.h:65,
- from /usr/include/c++/4.8/algorithm:62,
- from lol.cpp:3:
- /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note: mismatched types ‘const _CharT*’ and ‘rev(const string&)::__lambda0’
- __init = __init + *__first;
- ^
- In file included from /usr/include/c++/4.8/string:53:0,
- from lol.cpp:2:
- /usr/include/c++/4.8/bits/basic_string.tcc:708:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_string<_CharT, _Traits, _Alloc> std::operator+(_CharT, const std::basic_string<_CharT, _Traits, _Alloc>&)
- operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs)
- ^
- /usr/include/c++/4.8/bits/basic_string.tcc:708:5: note: template argument deduction/substitution failed:
- In file included from /usr/include/c++/4.8/numeric:62:0,
- from /usr/include/c++/4.8/bits/random.tcc:33,
- from /usr/include/c++/4.8/random:52,
- from /usr/include/c++/4.8/bits/stl_algo.h:65,
- from /usr/include/c++/4.8/algorithm:62,
- from lol.cpp:3:
- /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note: deduced conflicting types for parameter ‘_CharT’ (‘rev(const string&)::__lambda0’ and ‘char’)
- __init = __init + *__first;
- ^
- In file included from /usr/include/c++/4.8/string:52:0,
- from lol.cpp:2:
- /usr/include/c++/4.8/bits/basic_string.h:2402:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
- operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
- ^
- /usr/include/c++/4.8/bits/basic_string.h:2402:5: note: template argument deduction/substitution failed:
- In file included from /usr/include/c++/4.8/numeric:62:0,
- from /usr/include/c++/4.8/bits/random.tcc:33,
- from /usr/include/c++/4.8/random:52,
- from /usr/include/c++/4.8/bits/stl_algo.h:65,
- from /usr/include/c++/4.8/algorithm:62,
- from lol.cpp:3:
- /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note: ‘rev(const string&)::__lambda0’ is not derived from ‘const std::basic_string<_CharT, _Traits, _Alloc>’
- __init = __init + *__first;
- ^
- In file included from /usr/include/c++/4.8/string:52:0,
- from lol.cpp:2:
- /usr/include/c++/4.8/bits/basic_string.h:2418:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::basic_string<_CharT, _Traits, _Alloc>&, _CharT)
- operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
- ^
- /usr/include/c++/4.8/bits/basic_string.h:2418:5: note: template argument deduction/substitution failed:
- In file included from /usr/include/c++/4.8/numeric:62:0,
- from /usr/include/c++/4.8/bits/random.tcc:33,
- from /usr/include/c++/4.8/random:52,
- from /usr/include/c++/4.8/bits/stl_algo.h:65,
- from /usr/include/c++/4.8/algorithm:62,
- from lol.cpp:3:
- /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note: ‘rev(const string&)::__lambda0’ is not derived from ‘const std::basic_string<_CharT, _Traits, _Alloc>’
- __init = __init + *__first;
- ^
- In file included from /usr/include/c++/4.8/string:52:0,
- from lol.cpp:2:
- /usr/include/c++/4.8/bits/basic_string.h:2430:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_string<_CharT, _Traits, _Alloc> std::operator+(std::basic_string<_CharT, _Traits, _Alloc>&&, const std::basic_string<_CharT, _Traits, _Alloc>&)
- operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
- ^
- /usr/include/c++/4.8/bits/basic_string.h:2430:5: note: template argument deduction/substitution failed:
- In file included from /usr/include/c++/4.8/numeric:62:0,
- from /usr/include/c++/4.8/bits/random.tcc:33,
- from /usr/include/c++/4.8/random:52,
- from /usr/include/c++/4.8/bits/stl_algo.h:65,
- from /usr/include/c++/4.8/algorithm:62,
- from lol.cpp:3:
- /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note: ‘rev(const string&)::__lambda0’ is not derived from ‘std::basic_string<_CharT, _Traits, _Alloc>’
- __init = __init + *__first;
- ^
- In file included from /usr/include/c++/4.8/string:52:0,
- from lol.cpp:2:
- /usr/include/c++/4.8/bits/basic_string.h:2436:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_string<_CharT, _Traits, _Alloc> std::operator+(const std::basic_string<_CharT, _Traits, _Alloc>&, std::basic_string<_CharT, _Traits, _Alloc>&&)
- operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
- ^
- /usr/include/c++/4.8/bits/basic_string.h:2436:5: note: template argument deduction/substitution failed:
- In file included from /usr/include/c++/4.8/numeric:62:0,
- from /usr/include/c++/4.8/bits/random.tcc:33,
- from /usr/include/c++/4.8/random:52,
- from /usr/include/c++/4.8/bits/stl_algo.h:65,
- from /usr/include/c++/4.8/algorithm:62,
- from lol.cpp:3:
- /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note: ‘rev(const string&)::__lambda0’ is not derived from ‘const std::basic_string<_CharT, _Traits, _Alloc>’
- __init = __init + *__first;
- ^
- In file included from /usr/include/c++/4.8/string:52:0,
- from lol.cpp:2:
- /usr/include/c++/4.8/bits/basic_string.h:2442:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_string<_CharT, _Traits, _Alloc> std::operator+(std::basic_string<_CharT, _Traits, _Alloc>&&, std::basic_string<_CharT, _Traits, _Alloc>&&)
- operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
- ^
- /usr/include/c++/4.8/bits/basic_string.h:2442:5: note: template argument deduction/substitution failed:
- In file included from /usr/include/c++/4.8/numeric:62:0,
- from /usr/include/c++/4.8/bits/random.tcc:33,
- from /usr/include/c++/4.8/random:52,
- from /usr/include/c++/4.8/bits/stl_algo.h:65,
- from /usr/include/c++/4.8/algorithm:62,
- from lol.cpp:3:
- /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note: ‘rev(const string&)::__lambda0’ is not derived from ‘std::basic_string<_CharT, _Traits, _Alloc>’
- __init = __init + *__first;
- ^
- In file included from /usr/include/c++/4.8/string:52:0,
- from lol.cpp:2:
- /usr/include/c++/4.8/bits/basic_string.h:2454:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_string<_CharT, _Traits, _Alloc> std::operator+(const _CharT*, std::basic_string<_CharT, _Traits, _Alloc>&&)
- operator+(const _CharT* __lhs,
- ^
- /usr/include/c++/4.8/bits/basic_string.h:2454:5: note: template argument deduction/substitution failed:
- In file included from /usr/include/c++/4.8/numeric:62:0,
- from /usr/include/c++/4.8/bits/random.tcc:33,
- from /usr/include/c++/4.8/random:52,
- from /usr/include/c++/4.8/bits/stl_algo.h:65,
- from /usr/include/c++/4.8/algorithm:62,
- from lol.cpp:3:
- /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note: mismatched types ‘const _CharT*’ and ‘rev(const string&)::__lambda0’
- __init = __init + *__first;
- ^
- In file included from /usr/include/c++/4.8/string:52:0,
- from lol.cpp:2:
- /usr/include/c++/4.8/bits/basic_string.h:2460:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_string<_CharT, _Traits, _Alloc> std::operator+(_CharT, std::basic_string<_CharT, _Traits, _Alloc>&&)
- operator+(_CharT __lhs,
- ^
- /usr/include/c++/4.8/bits/basic_string.h:2460:5: note: template argument deduction/substitution failed:
- In file included from /usr/include/c++/4.8/numeric:62:0,
- from /usr/include/c++/4.8/bits/random.tcc:33,
- from /usr/include/c++/4.8/random:52,
- from /usr/include/c++/4.8/bits/stl_algo.h:65,
- from /usr/include/c++/4.8/algorithm:62,
- from lol.cpp:3:
- /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note: deduced conflicting types for parameter ‘_CharT’ (‘rev(const string&)::__lambda0’ and ‘char’)
- __init = __init + *__first;
- ^
- In file included from /usr/include/c++/4.8/string:52:0,
- from lol.cpp:2:
- /usr/include/c++/4.8/bits/basic_string.h:2466:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_string<_CharT, _Traits, _Alloc> std::operator+(std::basic_string<_CharT, _Traits, _Alloc>&&, const _CharT*)
- operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
- ^
- /usr/include/c++/4.8/bits/basic_string.h:2466:5: note: template argument deduction/substitution failed:
- In file included from /usr/include/c++/4.8/numeric:62:0,
- from /usr/include/c++/4.8/bits/random.tcc:33,
- from /usr/include/c++/4.8/random:52,
- from /usr/include/c++/4.8/bits/stl_algo.h:65,
- from /usr/include/c++/4.8/algorithm:62,
- from lol.cpp:3:
- /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note: ‘rev(const string&)::__lambda0’ is not derived from ‘std::basic_string<_CharT, _Traits, _Alloc>’
- __init = __init + *__first;
- ^
- In file included from /usr/include/c++/4.8/string:52:0,
- from lol.cpp:2:
- /usr/include/c++/4.8/bits/basic_string.h:2472:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_string<_CharT, _Traits, _Alloc> std::operator+(std::basic_string<_CharT, _Traits, _Alloc>&&, _CharT)
- operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
- ^
- /usr/include/c++/4.8/bits/basic_string.h:2472:5: note: template argument deduction/substitution failed:
- In file included from /usr/include/c++/4.8/numeric:62:0,
- from /usr/include/c++/4.8/bits/random.tcc:33,
- from /usr/include/c++/4.8/random:52,
- from /usr/include/c++/4.8/bits/stl_algo.h:65,
- from /usr/include/c++/4.8/algorithm:62,
- from lol.cpp:3:
- /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note: ‘rev(const string&)::__lambda0’ is not derived from ‘std::basic_string<_CharT, _Traits, _Alloc>’
- __init = __init + *__first;
- ^
- In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
- from /usr/include/c++/4.8/vector:60,
- from lol.cpp:1:
- /usr/include/c++/4.8/bits/stl_iterator.h:902:5: note: 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>&)
- operator+(typename __normal_iterator<_Iterator, _Container>::difference_type
- ^
- /usr/include/c++/4.8/bits/stl_iterator.h:902:5: note: template argument deduction/substitution failed:
- In file included from /usr/include/c++/4.8/numeric:62:0,
- from /usr/include/c++/4.8/bits/random.tcc:33,
- from /usr/include/c++/4.8/random:52,
- from /usr/include/c++/4.8/bits/stl_algo.h:65,
- from /usr/include/c++/4.8/algorithm:62,
- from lol.cpp:3:
- /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note: ‘std::basic_string<char>’ is not derived from ‘const __gnu_cxx::__normal_iterator<_Iterator, _Container>’
- __init = __init + *__first;
- pename __normal_iterator<_Iterator, _Container>::difference_type
- ^
- /usr/include/c++/4.8/bits/stl_iterator.h:902:5: note: template argument deduction/substitution failed:
- In file included from /usr/include/c++/4.8/numeric:62:0,
- from /usr/include/c++/4.8/bits/random.tcc:33,
- from /usr/include/c++/4.8/random:52,
- from /usr/include/c++/4.8/bits/stl_algo.h:65,
- from /usr/include/c++/4.8/algorithm:62,
- from lol.cpp:3:
- /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note: ‘std::basic_string<char>’ is not derived from ‘const __gnu_cxx::__normal_iterator<_Iterator, _Container>’
- __init = __init + *__first;
- ^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement