/ Vijos /

记录详情

Compile Error

In file included from /usr/include/c++/9/algorithm:62,
                 from foo.cc:4:
/usr/include/c++/9/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = x; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(x, x)>]':
/usr/include/c++/9/bits/stl_algo.h:4899:18:   required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = x; _Compare = bool (*)(x, x)]'
foo.cc:34:26:   required from here
/usr/include/c++/9/bits/stl_algo.h:1965:19: error: no match for 'operator!=' (operand types are 'x' and 'x')
 1965 |       if (__first != __last)
      |           ~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/9/iosfwd:40,
                 from /usr/include/c++/9/ios:38,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:3:
/usr/include/c++/9/bits/postypes.h:227:5: note: candidate: 'template<class _StateT> bool std::operator!=(const std::fpos<_StateT>&, const std::fpos<_StateT>&)'
  227 |     operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/9/bits/postypes.h:227:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/9/algorithm:62,
                 from foo.cc:4:
/usr/include/c++/9/bits/stl_algo.h:1965:19: note:   'x' is not derived from 'const std::fpos<_StateT>'
 1965 |       if (__first != __last)
      |           ~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
                 from /usr/include/c++/9/bits/char_traits.h:39,
                 from /usr/include/c++/9/ios:40,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:3:
/usr/include/c++/9/bits/stl_pair.h:461:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator!=(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)'
  461 |     operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
      |     ^~~~~~~~
/usr/include/c++/9/bits/stl_pair.h:461:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/9/algorithm:62,
                 from foo.cc:4:
/usr/include/c++/9/bits/stl_algo.h:1965:19: note:   'x' is not derived from 'const std::pair<_T1, _T2>'
 1965 |       if (__first != __last)
      |           ~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
                 from /usr/include/c++/9/bits/char_traits.h:39,
                 from /usr/include/c++/9/ios:40,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:3:
/usr/include/c++/9/bits/stl_iterator.h:337:5: note: candidate: 'template<class _Iterator> bool std::operator!=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)'
  337 |     operator!=(const reverse_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:337:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/9/algorithm:62,
                 from foo.cc:4:
/usr/include/c++/9/bits/stl_algo.h:1965:19: note:   'x' is not derived from 'const std::reverse_iterator<_Iterator>'
 1965 |       if (__first != __last)
      |           ~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
                 from /usr/include/c++/9/bits/char_traits.h:39,
                 from /usr/include/c++/9/ios:40,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:3:
/usr/include/c++/9/bits/stl_iterator.h:375:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator!=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)'
  375 |     operator!=(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:375:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/9/algorithm:62,
                 from foo.cc:4:
/usr/include/c++/9/bits/stl_algo.h:1965:19: note:   'x' is not derived from 'const std::reverse_iterator<_Iterator>'
 1965 |       if (__first != __last)
      |           ~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
                 from /usr/include/c++/9/bits/char_traits.h:39,
                 from /usr/include/c++/9/ios:40,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:3:
/usr/include/c++/9/bits/stl_iterator.h:1151:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator!=(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)'
 1151 |     operator!=(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:1151:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/9/algorithm:62,
                 from foo.cc:4:
/usr/include/c++/9/bits/stl_algo.h:1965:19: note:   'x' is not derived from 'const std::move_iterator<_IteratorL>'
 1965 |       if (__first != __last)
      |           ~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
                 from /usr/include/c++/9/bits/char_traits.h:39,
                 from /usr/include/c++/9/ios:40,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:3:
/usr/include/c++/9/bits/stl_iterator.h:1157:5: note: candidate: 'template<class _Iterator> bool std::operator!=(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)'
 1157 |     operator!=(const move_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:1157:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/9/algorithm:62,
                 from foo.cc:4:
/usr/include/c++/9/bits/stl_algo.h:1965:19: note:   'x' is not derived from 'const std::move_iterator<_IteratorL>'
 1965 |       if (__first != __last)
      |           ~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/9/string:41,
                 from /usr/include/c++/9/bits/locale_classes.h:40,
                 from /usr/include/c++/9/bits/ios_base.h:41,
                 from /usr/include/c++/9/ios:42,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:3:
/usr/include/c++/9/bits/allocator.h:174:5: note: candidate: 'template<class _T1, class _T2> bool std::operator!=(const std::allocator<_CharT>&, const std::allocator<_T2>&)'
  174 |     operator!=(const allocator<_T1>&, const allocator<_T2>&)
      |     ^~~~~~~~
/usr/include/c++/9/bits/allocator.h:174:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/9/algorithm:62,
                 from foo.cc:4:
/usr/include/c++/9/bits/stl_algo.h:1965:19: note:   'x' is not derived from 'const std::allocator<_CharT>'
 1965 |       if (__first != __last)
      |           ~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/9/string:55,
                 from /usr/include/c++/9/bits/locale_classes.h:40,
                 from /usr/include/c++/9/bits/ios_base.h:41,
                 from /usr/include/c++/9/ios:42,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:3:
/usr/include/c++/9/bits/basic_string.h:6188:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
 6188 |     operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/9/bits/basic_string.h:6188:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/9/algorithm:62,
                 from foo.cc:4:
/usr/include/c++/9/bits/stl_algo.h:1965:19: note:   'x' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
 1965 |       if (__first != __last)
      |           ~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/9/string:55,
                 from /usr/include/c++/9/bits/locale_classes.h:40,
                 from /usr/include/c++/9/bits/ios_base.h:41,
                 from /usr/include/c++/9/ios:42,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:3:
/usr/include/c++/9/bits/basic_string.h:6201:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)'
 6201 |     operator!=(const _CharT* __lhs,
      |     ^~~~~~~~
/usr/include/c++/9/bits/basic_string.h:6201:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/9/algorithm:62,
                 from foo.cc:4:
/usr/include/c++/9/bits/stl_algo.h:1965:19: note:   mismatched types 'const _CharT*' and 'x'
 1965 |       if (__first != __last)
      |           ~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/9/string:55,
                 from /usr/include/c++/9/bits/locale_classes.h:40,
                 from /usr/include/c++/9/bits/ios_base.h:41,
                 from /usr/include/c++/9/ios:42,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:3:
/usr/include/c++/9/bits/basic_string.h:6213:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)'
 6213 |     operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/9/bits/basic_string.h:6213:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/9/algorithm:62,
                 from foo.cc:4:
/usr/include/c++/9/bits/stl_algo.h:1965:19: note:   'x' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
 1965 |       if (__first != __last)
      |           ~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/9/bits/ios_base.h:46,
                 from /usr/include/c++/9/ios:42,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:3:
/usr/include/c++/9/system_error:319:3: note: candidate: 'bool std::operator!=(const std::error_code&, const std::error_code&)'
  319 |   operator!=(const error_code& __lhs, const error_code& __rhs) noexcept
      |   ^~~~~~~~
/usr/include/c++/9/system_error:319:32: note:   no known conversion for argument 1 from 'x' to 'const std::error_code&'
  319 |   operator!=(const error_code& __lhs, const error_code& __rhs) noexcept
      |              ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/9/system_error:323:3: note: candidate: 'bool std::operator!=(const std::error_code&, const std::error_condition&)'
  323 |   operator!=(const error_code& __lhs, const error_condition& __rhs) noexcept
      |   ^~~~~~~~
/usr/include/c++/9/system_error:323:32: note:   no known conversion for argument 1 from 'x' to 'const std::error_code&'
  323 |   operator!=(const error_code& __lhs, const error_condition& __rhs) noexcept
      |              ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/9/system_error:327:3: note: candidate: 'bool std::operator!=(const std::error_condition&, const std::error_code&)'
  327 |   operator!=(const error_condition& __lhs, const error_code& __rhs) noexcept
      |   ^~~~~~~~
/usr/include/c++/9/system_error:327:37: note:   no known conversion for argument 1 from 'x' to 'const std::error_condition&'
  327 |   operator!=(const error_condition& __lhs, const error_code& __rhs) noexcept
      |              ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/9/system_error:331:3: note: candidate: 'bool std::operator!=(const std::error_condition&, const std::error_condition&)'
  331 |   operator!=(const error_condition& __lhs,
      |   ^~~~~~~~
/usr/include/c++/9/system_error:331:37: note:   no known conversion for argument 1 from 'x' to 'const std::error_condition&'
  331 |   operator!=(const error_condition& __lhs,
      |              ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/9/bits/locale_facets.h:48,
                 from /usr/include/c++/9/bits/basic_ios.h:37,
                 from /usr/include/c++/9/ios:44,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:3:
/usr/include/c++/9/bits/streambuf_iterator.h:214:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator!=(const std::istreambuf_iterator<_CharT, _Traits>&, const std::istreambuf_iterator<_CharT, _Traits>&)'
  214 |     operator!=(const istreambuf_iterator<_CharT, _Traits>& __a,
      |     ^~~~~~~~
/usr/include/c++/9/bits/streambuf_iterator.h:214:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/9/algorithm:62,
                 from foo.cc:4:
/usr/include/c++/9/bits/stl_algo.h:1965:19: note:   'x' is not derived from 'const std::istreambuf_iterator<_CharT, _Traits>'
 1965 |       if (__first != __last)
      |           ~~~~~~~~^~~~~~~~~
/usr/include/c++/9/bits/stl_algo.h:1968:22: error: no match for 'operator-' (operand types are 'x' and 'x')
 1968 |     std::__lg(__last - __first) * 2,
      |               ~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
                 from /usr/include/c++/9/bits/char_traits.h:39,
                 from /usr/include/c++/9/ios:40,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:3:
/usr/include/c++/9/bits/stl_iterator.h:415:5: note: candidate: 'template<class _IteratorL, class _IteratorR> decltype ((__y.base() - __x.base())) std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)'
  415 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:415:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/9/algorithm:62,
                 from foo.cc:4:
/usr/include/c++/9/bits/stl_algo.h:1968:22: note:   'x' is not derived from 'const std::reverse_iterator<_Iterator>'
 1968 |     std::__lg(__last - __first) * 2,
      |               ~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
                 from /usr/include/c++/9/bits/char_traits.h:39,
                 from /usr/include/c++/9/ios:40,
                 from /usr/include/c++/9/ostream:38,
                 from /usr/include/c++/9/iostream:39,
                 from foo.cc:3:
/usr/include/c++/9/bits/stl_iterator.h:1212:5: note: candidate: 'template<class _IteratorL, class _IteratorR> decltype ((__x.base() - __y.base())) std::operator-(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)'
 1212 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:1212:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/9/algorithm:62,
                 from foo.cc:4:
/usr/include/c++/9/bits/stl_algo.h:1968:22: note:   'x' is not derived from 'const std::move_iterator<_IteratorL>'
 1968 |     std::__lg(__last - __first) * 2,
      |               ~~~~~~~^~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1551 我是打饭的
语言
C++
递交时间
2021-12-09 13:32:46
评测时间
2021-12-09 13:32:46
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes