Advertisement
Guest User

Untitled

a guest
May 4th, 2014
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 18.77 KB | None | 0 0
  1. lol.cpp: In function ‘std::string rev(const string&):
  2. 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>}
  3.                      });
  4.                       ^
  5. In file included from /usr/include/c++/4.8/numeric:62:0,
  6.                  from /usr/include/c++/4.8/bits/random.tcc:33,
  7.                  from /usr/include/c++/4.8/random:52,
  8.                  from /usr/include/c++/4.8/bits/stl_algo.h:65,
  9.                  from /usr/include/c++/4.8/algorithm:62,
  10.                  from lol.cpp:3:
  11. /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]:
  12. lol.cpp:23:22:   required from here
  13. /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>)
  14.   __init = __init + *__first;
  15.                   ^
  16. /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note: candidates are:
  17. In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
  18.                  from /usr/include/c++/4.8/vector:60,
  19.                  from lol.cpp:1:
  20. /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>&)
  21.      operator+(typename reverse_iterator<_Iterator>::difference_type __n,
  22.      ^
  23. /usr/include/c++/4.8/bits/stl_iterator.h:333:5: note:   template argument deduction/substitution failed:
  24. In file included from /usr/include/c++/4.8/numeric:62:0,
  25.                  from /usr/include/c++/4.8/bits/random.tcc:33,
  26.                  from /usr/include/c++/4.8/random:52,
  27.                  from /usr/include/c++/4.8/bits/stl_algo.h:65,
  28.                  from /usr/include/c++/4.8/algorithm:62,
  29.                  from lol.cpp:3:
  30. /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>
  31.   __init = __init + *__first;
  32.                   ^
  33. In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
  34.                  from /usr/include/c++/4.8/vector:60,
  35.                  from lol.cpp:1:
  36. /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>&)
  37.      operator+(typename move_iterator<_Iterator>::difference_type __n,
  38.      ^
  39. /usr/include/c++/4.8/bits/stl_iterator.h:1118:5: note:   template argument deduction/substitution failed:
  40. In file included from /usr/include/c++/4.8/numeric:62:0,
  41.                  from /usr/include/c++/4.8/bits/random.tcc:33,
  42.                  from /usr/include/c++/4.8/random:52,
  43.                  from /usr/include/c++/4.8/bits/stl_algo.h:65,
  44.                  from /usr/include/c++/4.8/algorithm:62,
  45.                  from lol.cpp:3:
  46. /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>
  47.   __init = __init + *__first;
  48.                   ^
  49. In file included from /usr/include/c++/4.8/vector:65:0,
  50.                  from lol.cpp:1:
  51. /usr/include/c++/4.8/bits/stl_bvector.h:293:3: note: std::_Bit_iterator std::operator+(std::ptrdiff_t, const std::_Bit_iterator&)
  52.    operator+(ptrdiff_t __n, const _Bit_iterator& __x)
  53.    ^
  54. /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&
  55. /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&)
  56.    operator+(ptrdiff_t __n, const _Bit_const_iterator& __x)
  57.    ^
  58. /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&
  59. In file included from /usr/include/c++/4.8/string:52:0,
  60.                  from lol.cpp:2:
  61. /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>&)
  62.      operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
  63.      ^
  64. /usr/include/c++/4.8/bits/basic_string.h:2365:5: note:   template argument deduction/substitution failed:
  65. In file included from /usr/include/c++/4.8/numeric:62:0,
  66.                  from /usr/include/c++/4.8/bits/random.tcc:33,
  67.                  from /usr/include/c++/4.8/random:52,
  68.                  from /usr/include/c++/4.8/bits/stl_algo.h:65,
  69.                  from /usr/include/c++/4.8/algorithm:62,
  70.                  from lol.cpp:3:
  71. /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>
  72.   __init = __init + *__first;
  73.                   ^
  74. In file included from /usr/include/c++/4.8/string:53:0,
  75.                  from lol.cpp:2:
  76. /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>&)
  77.      operator+(const _CharT* __lhs,
  78.      ^
  79. /usr/include/c++/4.8/bits/basic_string.tcc:692:5: note:   template argument deduction/substitution failed:
  80. In file included from /usr/include/c++/4.8/numeric:62:0,
  81.                  from /usr/include/c++/4.8/bits/random.tcc:33,
  82.                  from /usr/include/c++/4.8/random:52,
  83.                  from /usr/include/c++/4.8/bits/stl_algo.h:65,
  84.                  from /usr/include/c++/4.8/algorithm:62,
  85.                  from lol.cpp:3:
  86. /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note:   mismatched types ‘const _CharT*’ and ‘rev(const string&)::__lambda0’
  87.   __init = __init + *__first;
  88.                   ^
  89. In file included from /usr/include/c++/4.8/string:53:0,
  90.                  from lol.cpp:2:
  91. /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>&)
  92.      operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs)
  93.      ^
  94. /usr/include/c++/4.8/bits/basic_string.tcc:708:5: note:   template argument deduction/substitution failed:
  95. In file included from /usr/include/c++/4.8/numeric:62:0,
  96.                  from /usr/include/c++/4.8/bits/random.tcc:33,
  97.                  from /usr/include/c++/4.8/random:52,
  98.                  from /usr/include/c++/4.8/bits/stl_algo.h:65,
  99.                  from /usr/include/c++/4.8/algorithm:62,
  100.                  from lol.cpp:3:
  101. /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note:   deduced conflicting types for parameter ‘_CharT’ (‘rev(const string&)::__lambda0’ and ‘char)
  102.   __init = __init + *__first;
  103.                   ^
  104. In file included from /usr/include/c++/4.8/string:52:0,
  105.                  from lol.cpp:2:
  106. /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*)
  107.      operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
  108.      ^
  109. /usr/include/c++/4.8/bits/basic_string.h:2402:5: note:   template argument deduction/substitution failed:
  110. In file included from /usr/include/c++/4.8/numeric:62:0,
  111.                  from /usr/include/c++/4.8/bits/random.tcc:33,
  112.                  from /usr/include/c++/4.8/random:52,
  113.                  from /usr/include/c++/4.8/bits/stl_algo.h:65,
  114.                  from /usr/include/c++/4.8/algorithm:62,
  115.                  from lol.cpp:3:
  116. /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>
  117.   __init = __init + *__first;
  118.                   ^
  119. In file included from /usr/include/c++/4.8/string:52:0,
  120.                  from lol.cpp:2:
  121. /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)
  122.      operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
  123.      ^
  124. /usr/include/c++/4.8/bits/basic_string.h:2418:5: note:   template argument deduction/substitution failed:
  125. In file included from /usr/include/c++/4.8/numeric:62:0,
  126.                  from /usr/include/c++/4.8/bits/random.tcc:33,
  127.                  from /usr/include/c++/4.8/random:52,
  128.                  from /usr/include/c++/4.8/bits/stl_algo.h:65,
  129.                  from /usr/include/c++/4.8/algorithm:62,
  130.                  from lol.cpp:3:
  131. /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>
  132.   __init = __init + *__first;
  133.                   ^
  134. In file included from /usr/include/c++/4.8/string:52:0,
  135.                  from lol.cpp:2:
  136. /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>&)
  137.      operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
  138.      ^
  139. /usr/include/c++/4.8/bits/basic_string.h:2430:5: note:   template argument deduction/substitution failed:
  140. In file included from /usr/include/c++/4.8/numeric:62:0,
  141.                  from /usr/include/c++/4.8/bits/random.tcc:33,
  142.                  from /usr/include/c++/4.8/random:52,
  143.                  from /usr/include/c++/4.8/bits/stl_algo.h:65,
  144.                  from /usr/include/c++/4.8/algorithm:62,
  145.                  from lol.cpp:3:
  146. /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>
  147.   __init = __init + *__first;
  148.                   ^
  149. In file included from /usr/include/c++/4.8/string:52:0,
  150.                  from lol.cpp:2:
  151. /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>&&)
  152.      operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
  153.      ^
  154. /usr/include/c++/4.8/bits/basic_string.h:2436:5: note:   template argument deduction/substitution failed:
  155. In file included from /usr/include/c++/4.8/numeric:62:0,
  156.                  from /usr/include/c++/4.8/bits/random.tcc:33,
  157.                  from /usr/include/c++/4.8/random:52,
  158.                  from /usr/include/c++/4.8/bits/stl_algo.h:65,
  159.                  from /usr/include/c++/4.8/algorithm:62,
  160.                  from lol.cpp:3:
  161. /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>
  162.   __init = __init + *__first;
  163.                   ^
  164. In file included from /usr/include/c++/4.8/string:52:0,
  165.                  from lol.cpp:2:
  166. /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>&&)
  167.      operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
  168.      ^
  169. /usr/include/c++/4.8/bits/basic_string.h:2442:5: note:   template argument deduction/substitution failed:
  170. In file included from /usr/include/c++/4.8/numeric:62:0,
  171.                  from /usr/include/c++/4.8/bits/random.tcc:33,
  172.                  from /usr/include/c++/4.8/random:52,
  173.                  from /usr/include/c++/4.8/bits/stl_algo.h:65,
  174.                  from /usr/include/c++/4.8/algorithm:62,
  175.                  from lol.cpp:3:
  176. /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>
  177.   __init = __init + *__first;
  178.                   ^
  179. In file included from /usr/include/c++/4.8/string:52:0,
  180.                  from lol.cpp:2:
  181. /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>&&)
  182.      operator+(const _CharT* __lhs,
  183.      ^
  184. /usr/include/c++/4.8/bits/basic_string.h:2454:5: note:   template argument deduction/substitution failed:
  185. In file included from /usr/include/c++/4.8/numeric:62:0,
  186.                  from /usr/include/c++/4.8/bits/random.tcc:33,
  187.                  from /usr/include/c++/4.8/random:52,
  188.                  from /usr/include/c++/4.8/bits/stl_algo.h:65,
  189.                  from /usr/include/c++/4.8/algorithm:62,
  190.                  from lol.cpp:3:
  191. /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note:   mismatched types ‘const _CharT*’ and ‘rev(const string&)::__lambda0’
  192.   __init = __init + *__first;
  193.                   ^
  194. In file included from /usr/include/c++/4.8/string:52:0,
  195.                  from lol.cpp:2:
  196. /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>&&)
  197.      operator+(_CharT __lhs,
  198.      ^
  199. /usr/include/c++/4.8/bits/basic_string.h:2460:5: note:   template argument deduction/substitution failed:
  200. In file included from /usr/include/c++/4.8/numeric:62:0,
  201.                  from /usr/include/c++/4.8/bits/random.tcc:33,
  202.                  from /usr/include/c++/4.8/random:52,
  203.                  from /usr/include/c++/4.8/bits/stl_algo.h:65,
  204.                  from /usr/include/c++/4.8/algorithm:62,
  205.                  from lol.cpp:3:
  206. /usr/include/c++/4.8/bits/stl_numeric.h:127:18: note:   deduced conflicting types for parameter ‘_CharT’ (‘rev(const string&)::__lambda0’ and ‘char)
  207.   __init = __init + *__first;
  208.                   ^
  209. In file included from /usr/include/c++/4.8/string:52:0,
  210.                  from lol.cpp:2:
  211. /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*)
  212.      operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
  213.      ^
  214. /usr/include/c++/4.8/bits/basic_string.h:2466:5: note:   template argument deduction/substitution failed:
  215. In file included from /usr/include/c++/4.8/numeric:62:0,
  216.                  from /usr/include/c++/4.8/bits/random.tcc:33,
  217.                  from /usr/include/c++/4.8/random:52,
  218.                  from /usr/include/c++/4.8/bits/stl_algo.h:65,
  219.                  from /usr/include/c++/4.8/algorithm:62,
  220.                  from lol.cpp:3:
  221. /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>
  222.   __init = __init + *__first;
  223.                   ^
  224. In file included from /usr/include/c++/4.8/string:52:0,
  225.                  from lol.cpp:2:
  226. /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)
  227.      operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
  228.      ^
  229. /usr/include/c++/4.8/bits/basic_string.h:2472:5: note:   template argument deduction/substitution failed:
  230. In file included from /usr/include/c++/4.8/numeric:62:0,
  231.                  from /usr/include/c++/4.8/bits/random.tcc:33,
  232.                  from /usr/include/c++/4.8/random:52,
  233.                  from /usr/include/c++/4.8/bits/stl_algo.h:65,
  234.                  from /usr/include/c++/4.8/algorithm:62,
  235.                  from lol.cpp:3:
  236. /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>
  237.   __init = __init + *__first;
  238.                   ^
  239. In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
  240.                  from /usr/include/c++/4.8/vector:60,
  241.                  from lol.cpp:1:
  242. /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>&)
  243.      operator+(typename __normal_iterator<_Iterator, _Container>::difference_type
  244.      ^
  245. /usr/include/c++/4.8/bits/stl_iterator.h:902:5: note:   template argument deduction/substitution failed:
  246. In file included from /usr/include/c++/4.8/numeric:62:0,
  247.                  from /usr/include/c++/4.8/bits/random.tcc:33,
  248.                  from /usr/include/c++/4.8/random:52,
  249.                  from /usr/include/c++/4.8/bits/stl_algo.h:65,
  250.                  from /usr/include/c++/4.8/algorithm:62,
  251.                  from lol.cpp:3:
  252. /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>
  253.   __init = __init + *__first;
  254.    pename __normal_iterator<_Iterator, _Container>::difference_type
  255.      ^
  256. /usr/include/c++/4.8/bits/stl_iterator.h:902:5: note:   template argument deduction/substitution failed:
  257. In file included from /usr/include/c++/4.8/numeric:62:0,
  258.                  from /usr/include/c++/4.8/bits/random.tcc:33,
  259.                  from /usr/include/c++/4.8/random:52,
  260.                  from /usr/include/c++/4.8/bits/stl_algo.h:65,
  261.                  from /usr/include/c++/4.8/algorithm:62,
  262.                  from lol.cpp:3:
  263. /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>
  264.   __init = __init + *__first;
  265.                   ^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement