/ Vijos /

记录详情

Compile Error

In file included from /usr/include/c++/6/algorithm:62:0,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/stl_algo.h: In instantiation of '_Iterator std::__find_if(_Iterator, _Iterator, _Predicate) [with _Iterator = long int; _Predicate = __gnu_cxx::__ops::_Iter_equals_val<const long int>]':
/usr/include/c++/6/bits/stl_algo.h:3792:28:   required from '_IIter std::find(_IIter, _IIter, const _Tp&) [with _IIter = long int; _Tp = long int]'
/in/foo.cc:69:28:   required from here
/usr/include/c++/6/bits/stl_algo.h:162:34: error: no matching function for call to '__iterator_category(long int&)'
          std::__iterator_category(__first));
          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:65:0,
                 from /usr/include/c++/6/bits/char_traits.h:39,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_types.h:204:5: note: candidate: template<class _Iter> typename std::iterator_traits<_Iterator>::iterator_category std::__iterator_category(const _Iter&)
     __iterator_category(const _Iter&)
     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_iterator_base_types.h:204:5: note:   template argument deduction/substitution failed:
/usr/include/c++/6/bits/stl_iterator_base_types.h: In substitution of 'template<class _Iter> typename std::iterator_traits<_Iterator>::iterator_category std::__iterator_category(const _Iter&) [with _Iter = long int]':
/usr/include/c++/6/bits/stl_algo.h:162:34:   required from '_Iterator std::__find_if(_Iterator, _Iterator, _Predicate) [with _Iterator = long int; _Predicate = __gnu_cxx::__ops::_Iter_equals_val<const long int>]'
/usr/include/c++/6/bits/stl_algo.h:3792:28:   required from '_IIter std::find(_IIter, _IIter, const _Tp&) [with _IIter = long int; _Tp = long int]'
/in/foo.cc:69:28:   required from here
/usr/include/c++/6/bits/stl_iterator_base_types.h:204:5: error: no type named 'iterator_category' in 'struct std::iterator_traits<long int>'
In file included from /usr/include/c++/6/algorithm:62:0,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/6/bits/stl_algo.h:1882:25:   required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:1968:31:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:4707:18:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = long int]'
/in/foo.cc:66:17:   required from here
/usr/include/c++/6/bits/stl_algo.h:1847:3: error: no type named 'value_type' in 'struct std::iterator_traits<long int>'
   __val = _GLIBCXX_MOVE(*__i);
   ^~~~~
/usr/include/c++/6/bits/stl_algo.h:1849:8: error: invalid type argument of unary '*' (have 'long int')
        *__first = _GLIBCXX_MOVE(__val);
        ^~~~~~~~
/usr/include/c++/6/bits/stl_algo.h:1847:3: error: no type named 'value_type' in 'struct std::iterator_traits<long int>'
   __val = _GLIBCXX_MOVE(*__i);
   ^~~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:71:0,
                 from /usr/include/c++/6/bits/char_traits.h:39,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = long int; _Iterator2 = long int]':
/usr/include/c++/6/bits/stl_algo.h:1844:14:   required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:1882:25:   required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:1968:31:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:4707:18:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = long int]'
/in/foo.cc:66:17:   required from here
/usr/include/c++/6/bits/predefined_ops.h:43:16: error: invalid type argument of unary '*' (have 'long int')
       { return *__it1 < *__it2; }
                ^~~~~~
/usr/include/c++/6/bits/predefined_ops.h:43:25: error: invalid type argument of unary '*' (have 'long int')
       { return *__it1 < *__it2; }
                         ^~~~~~
In file included from /usr/include/c++/6/bits/stl_algo.h:61:0,
                 from /usr/include/c++/6/algorithm:62,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/stl_heap.h: In instantiation of 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/6/bits/stl_algo.h:1669:23:   required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:1930:25:   required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:1945:27:   required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = long int; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:1965:25:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:4707:18:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = long int]'
/in/foo.cc:66:17:   required from here
/usr/include/c++/6/bits/stl_heap.h:323:4: error: no type named 'value_type' in 'struct std::iterator_traits<long int>'
    _ValueType;
    ^~~~~~~~~~
/usr/include/c++/6/bits/stl_heap.h:325:4: error: no type named 'difference_type' in 'struct std::iterator_traits<long int>'
    _DistanceType;
    ^~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_heap.h: In instantiation of 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/6/bits/stl_algo.h:1672:19:   required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:1930:25:   required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:1945:27:   required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = long int; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/6/bits/stl_algo.h:1965:25:   required from 'void std::__so

信息

递交者
类型
递交
题目
P1237 隐形的翅膀
语言
C++
递交时间
2018-02-24 21:06:42
评测时间
2018-02-24 21:06:42
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes