记录详情

Compile Error

/in/foo.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
In file included from /usr/include/c++/12/bits/stl_algobase.h:62,
                 from /usr/include/c++/12/vector:60,
                 from /in/foo.cc:2:
/usr/include/c++/12/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
  164 |   __is_null_pointer(std::nullptr_t)
      |                                   ^
/usr/include/c++/12/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)'
  159 |     __is_null_pointer(_Type)
      |     ^~~~~~~~~~~~~~~~~
/usr/include/c++/12/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std'
  164 |   __is_null_pointer(std::nullptr_t)
      |                          ^~~~~~~~~
In file included from /usr/include/c++/12/bits/stl_pair.h:60,
                 from /usr/include/c++/12/bits/stl_algobase.h:64:
/usr/include/c++/12/type_traits:242:27: error: 'size_t' has not been declared
  242 |   template <typename _Tp, size_t = sizeof(_Tp)>
      |                           ^~~~~~
/usr/include/c++/12/type_traits:452:31: error: 'std::size_t' has not been declared
  452 |   template<typename _Tp, std::size_t _Size>
      |                               ^~~~~~
/usr/include/c++/12/type_traits:453:25: error: '_Size' was not declared in this scope
  453 |     struct is_array<_Tp[_Size]>
      |                         ^~~~~
/usr/include/c++/12/type_traits:453:31: error: template argument 1 is invalid
  453 |     struct is_array<_Tp[_Size]>
      |                               ^
/usr/include/c++/12/type_traits:558:42: error: 'nullptr_t' is not a member of 'std'
  558 |     struct __is_null_pointer_helper<std::nullptr_t>
      |                                          ^~~~~~~~~
/usr/include/c++/12/type_traits:558:42: error: 'nullptr_t' is not a member of 'std'
/usr/include/c++/12/type_traits:558:51: error: template argument 1 is invalid
  558 |     struct __is_null_pointer_helper<std::nullptr_t>
      |                                                   ^
/usr/include/c++/12/type_traits:1386:37: error: 'size_t' is not a member of 'std'
 1386 |     : public integral_constant<std::size_t, alignof(_Tp)>
      |                                     ^~~~~~
/usr/include/c++/12/type_traits:1386:37: error: 'size_t' is not a member of 'std'
/usr/include/c++/12/type_traits:1386:57: error: template argument 1 is invalid
 1386 |     : public integral_constant<std::size_t, alignof(_Tp)>
      |                                                         ^
/usr/include/c++/12/type_traits:1386:57: note: invalid template non-type parameter
/usr/include/c++/12/type_traits:1395:37: error: 'size_t' is not a member of 'std'
 1395 |     : public integral_constant<std::size_t, 0> { };
      |                                     ^~~~~~
/usr/include/c++/12/type_traits:1395:37: error: 'size_t' is not a member of 'std'
/usr/include/c++/12/type_traits:1395:46: error: template argument 1 is invalid
 1395 |     : public integral_constant<std::size_t, 0> { };
      |                                              ^
/usr/include/c++/12/type_traits:1395:46: note: invalid template non-type parameter
/usr/include/c++/12/type_traits:1397:31: error: 'std::size_t' has not been declared
 1397 |   template<typename _Tp, std::size_t _Size>
      |                               ^~~~~~
/usr/include/c++/12/type_traits:1398:21: error: '_Size' was not declared in this scope
 1398 |     struct rank<_Tp[_Size]>
      |                     ^~~~~
/usr/include/c++/12/type_traits:1398:27: error: template argument 1 is invalid
 1398 |     struct rank<_Tp[_Size]>
      |                           ^
/usr/include/c++/12/type_traits:1399:37: error: 'size_t' is not a member of 'std'
 1399 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                     ^~~~~~
/usr/include/c++/12/type_traits:1399:37: error: 'size_t' is not a member of 'std'
/usr/include/c++/12/type_traits:1399:65: error: template argument 1 is invalid
 1399 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                                                 ^
/usr/include/c++/12/type_traits:1399:65: note: invalid template non-type parameter
/usr/include/c++/12/type_traits:1403:37: error: 'size_t' is not a member of 'std'
 1403 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                     ^~~~~~
/usr/include/c++/12/type_traits:1403:37: error: 'size_t' is not a member of 'std'
/usr/include/c++/12/type_traits:1403:65: error: template argument 1 is invalid
 1403 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                                                 ^
/usr/include/c++/12/type_traits:1403:65: note: invalid template non-type parameter
/usr/include/c++/12/type_traits:1408:37: error: 'size_t' is not a member of 'std'
 1408 |     : public integral_constant<std::size_t, 0> { };
      |                                     ^~~~~~
/usr/include/c++/12/type_traits:1408:37: error: 'size_t' is not a member of 'std'
/usr/include/c++/12/type_traits:1408:46: error: template argument 1 is invalid
 1408 |     : public integral_constant<std::size_t, 0> { };
      |                                              ^
/usr/include/c++/12/type_traits:1408:46: note: invalid template non-type parameter
/usr/include/c++/12/type_traits:1410:47: error: 'std::size_t' has not been declared
 1410 |   template<typename _Tp, unsigned _Uint, std::size_t _Size>
      |                                               ^~~~~~
/usr/include/c++/12/type_traits:1411:23: error: '_Size' was not declared in this scope
 1411 |     struct extent<_Tp[_Size], _Uint>
      |                       ^~~~~
/usr/include/c++/12/type_traits:1411:36: error: template argument 1 is invalid
 1411 |     struct extent<_Tp[_Size], _Uint>
      |                                    ^
/usr/include/c++/12/type_traits:1412:37: error: 'size_t' is not a member of 'std'
 1412 |     : public integral_constant<std::size_t,
      |                                     ^~~~~~
/usr/include/c++/12/type_traits:1412:37: error: 'size_t' is not a member of 'std'
/usr/include/c++/12/type_traits:1413:45: error: '_Size' was not declared in this scope
 1413 |                                _Uint == 0 ? _Size : extent<_Tp,
      |                                             ^~~~~
/usr/include/c++/12/type_traits:1414:77: error: template argument 1 is invalid
 1414 |                                                            _Uint - 1>::value>
      |                                                                             ^
/usr/include/c++/12/type_traits:1414:77: note: invalid template non-type parameter
/usr/include/c++/12/type_traits:1419:37: error: 'size_t' is not a member of 'std'
 1419 |     : public integral_constant<std::size_t,
      |                                     ^~~~~~
/usr/include/c++/12/type_traits:1419:37: error: 'size_t' is not a member of 'std'
/usr/include/c++/12/type_traits:1421:73: error: template argument 1 is invalid
 1421 |                                                        _Uint - 1>::value>
      |                                                                         ^
/usr/include/c++/12/type_traits:1421:73: note: invalid template non-type parameter
/usr/include/c++/12/type_traits:1794:26: error: 'size_t' does not name a type
 1794 |       { static constexpr size_t __size = sizeof(_Tp); };
      |                          ^~~~~~
/usr/include/c++/12/type_traits:1:1: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
  +++ |+#include <cstddef>
    1 | // C++11 <type_traits> -*- C++ -*-
/usr/include/c++/12/type_traits:1796:14: error: 'size_t' has not been declared
 1796 |     template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)>
      |              ^~~~~~
/usr/include/c++/12/type_traits:1796:48: error: '_Sz' was not declared in this scope
 1796 |     template<size_t _Sz, 

信息

递交者
类型
递交
题目
2-4 点名上前
比赛
2025年春 南师大《程序设计与竞赛》作业赛第三场
语言
C++
递交时间
2025-03-21 22:43:53
评测时间
2025-03-21 22:43:53
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes