关于end是否是Linux的关键字
  • 板块学术版
  • 楼主ccjjxx
  • 当前回复8
  • 已保存回复8
  • 发布时间2023/11/18 17:33
  • 上次更新2023/11/18 17:53:09
查看原帖
关于end是否是Linux的关键字
486150
ccjjxx楼主2023/11/18 17:33

在云斗学院测的 T2 ,开了一个叫 end 的数组,然后 CE 了,反馈如下。

本地运行没问题,求解。

foo.cc: In function 'bool check()':
foo.cc:24:17: error: reference to 'end' is ambiguous
   24 |                 end[i]=str[i];
      |                 ^~~
In file included from /nix/gcc-12.3.0/include/c++/12.3.0/x86_64-unknown-linux-gnu/bits/stdc++.h:95,
                 from foo.cc:6:
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1255:5: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1239:5: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1239 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
In file included from /nix/gcc-12.3.0/include/c++/12.3.0/string:52,
                 from /nix/gcc-12.3.0/include/c++/12.3.0/bits/locale_classes.h:40,
                 from /nix/gcc-12.3.0/include/c++/12.3.0/bits/ios_base.h:41,
                 from /nix/gcc-12.3.0/include/c++/12.3.0/ios:42,
                 from /nix/gcc-12.3.0/include/c++/12.3.0/istream:38,
                 from /nix/gcc-12.3.0/include/c++/12.3.0/sstream:38,
                 from /nix/gcc-12.3.0/include/c++/12.3.0/complex:45,
                 from /nix/gcc-12.3.0/include/c++/12.3.0/ccomplex:39,
                 from /nix/gcc-12.3.0/include/c++/12.3.0/x86_64-unknown-linux-gnu/bits/stdc++.h:54:
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
In file included from /nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:36:
/nix/gcc-12.3.0/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:18:6: note:                 'char end [100010]'
   18 | char end[100010];
      |      ^~~
foo.cc:30:25: error: reference to 'end' is ambiguous
   30 |                         end[op[i].valed]=end[op[i].val];
      |                         ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1255:5: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1239:5: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1239 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:18:6: note:                 'char end [100010]'
   18 | char end[100010];
      |      ^~~
foo.cc:30:42: error: reference to 'end' is ambiguous
   30 |                         end[op[i].valed]=end[op[i].val];
      |                                          ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1255:5: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1239:5: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1239 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:18:6: note:                 'char end [100010]'
   18 | char end[100010];
      |      ^~~
foo.cc:34:28: error: reference to 'end' is ambiguous
   34 |                         if(end[op[i].val]=='t')
      |                            ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1255:5: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1239:5: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1239 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:18:6: note:                 'char end [100010]'
   18 | char end[100010];
      |      ^~~
foo.cc:36:33: error: reference to 'end' is ambiguous
   36 |                                 end[op[i].valed]='f';
      |                                 ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1255:5: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1239:5: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1239 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:18:6: note:                 'char end [100010]'
   18 | char end[100010];
      |      ^~~
foo.cc:38:33: error: reference to 'end' is ambiguous
   38 |                         else if(end[op[i].val]=='f')
      |                                 ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1255:5: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1239:5: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1239 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:18:6: note:                 'char end [100010]'
   18 | char end[100010];
      |      ^~~
foo.cc:40:33: error: reference to 'end' is ambiguous
   40 |                                 end[op[i].valed]='t';
      |                                 ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1255:5: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1239:5: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1239 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:18:6: note:                 'char end [100010]'
   18 | char end[100010];
      |      ^~~
foo.cc:42:30: error: reference to 'end' is ambiguous
   42 |                         else end[op[i].valed]=end[op[i].val];
      |                              ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1255:5: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1239:5: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1239 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:18:6: note:                 'char end [100010]'
   18 | char end[100010];
      |      ^~~
foo.cc:42:47: error: reference to 'end' is ambiguous
   42 |                         else end[op[i].valed]=end[op[i].val];
      |                                               ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1255:5: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1239:5: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1239 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:18:6: note:                 'char end [100010]'
   18 | char end[100010];
      |      ^~~
foo.cc:47:25: error: reference to 'end' is ambiguous
   47 |                         end[op[i].valed]='t';
      |                         ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1255:5: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1239:5: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1239 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:18:6: note:                 'char end [100010]'
   18 | char end[100010];
      |      ^~~
foo.cc:49:25: error: reference to 'end' is ambiguous
   49 |                         end[op[i].valed]='f';
      |                         ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1255:5: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1239:5: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1239 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:18:6: note:                 'char end [100010]'
   18 | char end[100010];
      |      ^~~
foo.cc:51:25: error: reference to 'end' is ambiguous
   51 |                         end[op[i].valed]='u';
      |                         ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1255:5: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1239:5: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1239 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:18:6: note:                 'char end [100010]'
   18 | char end[100010];
      |      ^~~
foo.cc:56:20: error: reference to 'end' is ambiguous
   56 |                 if(end[i]!=str[i])
      |                    ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1255:5: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1239:5: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1239 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:18:6: note:                 'char end [100010]'
   18 | char end[100010];
      |      ^~~
foo.cc: In function 'void dfs(int)':
foo.cc:70:36: error: reference to 'end' is ambiguous
   70 |                                 if(end[i]=='u') ++cnt[ccnt];
      |                                    ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1255:5: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1239:5: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1239 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:18:6: note:                 'char end [100010]'
   18 | char end[100010];
      |      ^~~
foo.cc: In function 'int main()':
foo.cc:142:49: error: reference to 'end' is ambiguous
  142 |                                                 end[oo]='u';
      |                                                 ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1255:5: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1239:5: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1239 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:18:6: note:                 'char end [100010]'
   18 | char end[100010];
      |      ^~~
foo.cc:146:49: error: reference to 'end' is ambiguous
  146 |                                                 end[oo]='f';
      |                                                 ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1255:5: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1239:5: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1239 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:18:6: note:                 'char end [100010]'
   18 | char end[100010];
      |      ^~~
foo.cc:148:46: error: reference to 'end' is ambiguous
  148 |                                         else end[oo]='t';
      |                                              ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1255:5: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1239:5: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1239 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:18:6: note:                 'char end [100010]'
   18 | char end[100010];
      |      ^~~
foo.cc:153:36: error: reference to 'end' is ambiguous
  153 |                                 if(end[i]=='u') ++cccnt;
      |                                    ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1255:5: note: candidates are: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/valarray:1239:5: note:                 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1239 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:106:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/gcc-12.3.0/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:18:6: note:                 'char end [100010]'
   18 | char end[100010];
      |      ^~~
2023/11/18 17:33
加载中...