/ 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 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]':
/usr/include/c++/6/bits/stl_algo.h:1882:25:   required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:1968:31:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:4739:18:   required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int; _Compare = bool (*)(int, int)]'
/in/foo.cc:45:26:   required from here
/usr/include/c++/6/bits/stl_algo.h:1847:3: error: no type named 'value_type' in 'struct std::iterator_traits<int>'
   __val = _GLIBCXX_MOVE(*__i);
   ^~~~~
/usr/include/c++/6/bits/stl_algo.h:1849:8: error: invalid type argument of unary '*' (have '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<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_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = int; _Iterator2 = int; _Compare = bool (*)(int, int)]':
/usr/include/c++/6/bits/stl_algo.h:1844:14:   required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:1882:25:   required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:1968:31:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:4739:18:   required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int; _Compare = bool (*)(int, int)]'
/in/foo.cc:45:26:   required from here
/usr/include/c++/6/bits/predefined_ops.h:125:31: error: invalid type argument of unary '*' (have 'int')
         { return bool(_M_comp(*__it1, *__it2)); }
                               ^~~~~~
/usr/include/c++/6/bits/predefined_ops.h:125:39: error: invalid type argument of unary '*' (have 'int')
         { return bool(_M_comp(*__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 = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]':
/usr/include/c++/6/bits/stl_algo.h:1669:23:   required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:1930:25:   required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:1945:27:   required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:1965:25:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:4739:18:   required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int; _Compare = bool (*)(int, int)]'
/in/foo.cc:45:26:   required from here
/usr/include/c++/6/bits/stl_heap.h:323:4: error: no type named 'value_type' in 'struct std::iterator_traits<int>'
    _ValueType;
    ^~~~~~~~~~
/usr/include/c++/6/bits/stl_heap.h:325:4: error: no type named 'difference_type' in 'struct std::iterator_traits<int>'
    _DistanceType;
    ^~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_heap.h: In instantiation of 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]':
/usr/include/c++/6/bits/stl_algo.h:1672:19:   required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:1930:25:   required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:1945:27:   required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:1965:25:   required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/6/bits/stl_algo.h:4739:18:   required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int; _Compare = bool (*)(int, int)]'
/in/foo.cc:45:26:   required from here
/usr/include/c++/6/bits/stl_heap.h:241:2: error: no type named 'value_type' in 'struct std::iterator_traits<int>'
  _ValueType;
  ^~~~~~~~~~
/usr/include/c++/6/bits/stl_heap.h:243:2: error: no type named 'difference_type' in 'struct std::iterator_traits<int>'
  _DistanceType;
  ^~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_heap.h:246:7: error: invalid type argument of unary '*' (have 'int')
       *__result = _GLIBCXX_MOVE(*__first);
       ^~~~~~~~~
In file included from /usr/include/c++/6/bits/nested_exception.h:40:0,
                 from /usr/include/c++/6/exception:173,
                 from /usr/include/c++/6/ios:39,
                 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_heap.h:246:19: error: invalid type argument of unary '*' (have 'int')
       *__result = _GLIBCXX_MOVE(*__first);
                   ^
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                 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_algobase.h: In instantiation of 'void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = int; _ForwardIterator2 = int]':
/usr/include/c++/6/bits/stl_algo.h:84:20:   require

信息

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