Borderou de evaluare (job #1440659)
Utilizator | Data | 23 mai 2015 13:41:30 | |
---|---|---|---|
Problema | Schi | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int main()’:
user.cpp:20:10: error: no match for ‘operator-’ (operand types are ‘std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ and ‘std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’)
q=it1-it2;
^
user.cpp:20:10: note: candidates are:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
from /usr/include/c++/4.8/bits/stl_tree.h:61,
from /usr/include/c++/4.8/set:60,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_iterator.h:327:5: note: template<class _Iterator> typename std::reverse_iterator<_Iterator>::difference_type std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
operator-(const reverse_iterator<_Iterator>& __x,
^
/usr/include/c++/4.8/bits/stl_iterator.h:327:5: note: template argument deduction/substitution failed:
user.cpp:20:11: note: ‘std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
q=it1-it2;
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
from /usr/include/c++/4.8/bits/stl_tree.h:61,
from /usr/include/c++/4.8/set:60,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_iterator.h:379:5: note: template<class _IteratorL, class _IteratorR> decltype ((__y.base() - __x.base())) std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
operator-(const reverse_iterator<_IteratorL>& __x,
^
/usr/include/c++/4.8/bits/stl_iterator.h:379:5: note: template argument deduction/substitution failed:
user.cpp:20:11: note: ‘std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ is not derived from ‘const std::reverse_iterator<_Iterator>’
q=it1-it2;
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
from /usr/include/c++/4.8/bits/stl_tree.h:61,
from /usr/include/c++/4.8/set:60,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_iterator.h:1104:5: note: template<class _IteratorL, class _IteratorR> decltype ((__x.base() - __y.base())) std::operator-(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
operator-(const move_iterator<_IteratorL>& __x,
^
/usr/include/c++/4.8/bits/stl_iterator.h:1104:5: note: template argument deduction/substitution failed:
user.cpp:20:11: note: ‘std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ is not derived from ‘const std::move_iterator<_Iterator>’
q=it1-it2;
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
from /usr/include/c++/4.8/bits/stl_tree.h:61,
from /usr/include/c++/4.8/set:60,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_iterator.h:1111:5: note: template<class _Iterator> decltype ((__x.base() - __y.base())) std::operator-(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
operator-(const move_iterator<_Iterator>& __x,
^
/usr/include/c++/4.8/bits/stl_iterator.h:1111:5: note: template argument deduction/substitution failed:
user.cpp:20:11: note: ‘std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ is not derived from ‘const std::move_iterator<_Iterator>’
q=it1-it2;
^
user.cpp:26:14: error: no match for ‘operator-’ (operand types are ‘std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’ and ‘std::set<int>::iterator {aka std::_Rb_tree_const_iterator<int>}’)
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !