记录详情

Compile Error

/in/foo.cc: In instantiation of 'std::string toString(const std::vector<T>&) [with T = int; std::string = std::__cxx11::basic_string<char>]':
/in/foo.cc:41:21:   required from here
/in/foo.cc:15:24: error: no matching function for call to 'toString(const __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
   15 |         str += toString(list[i]) + " ";
      |                ~~~~~~~~^~~~~~~~~
/in/foo.cc:12:13: note: candidate: 'template<class T> std::string toString(const std::vector<T>&)'
   12 | std::string toString(const std::vector<T>& list) {
      |             ^~~~~~~~
/in/foo.cc:12:13: note:   template argument deduction/substitution failed:
/in/foo.cc:15:24: note:   mismatched types 'const std::vector<T>' and 'const __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'const int'}
   15 |         str += toString(list[i]) + " ";
      |                ~~~~~~~~^~~~~~~~~

信息

递交者
类型
自测
语言
C++
递交时间
2025-07-03 08:40:58
评测时间
2025-07-03 08:40:58
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes