F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_38716575_13388.cpp: In function 'int main()':
0_0_38716575_13388.cpp:71:29: error: no matching function for call to 'swap(std::vector<int>&, std::vector<int>)'
   71 |                         swap(G[i],vector<int>());
      |                         ~~~~^~~~~~~~~~~~~~~~~~~~
In file included from .\stdc++.h:77:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/any:429:15: note: candidate: 'void std::swap(any&, any&)' (near match)
  429 |   inline void swap(any& __x, any& __y) noexcept { __x.swap(__y); }
      |               ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/any:429:15: note:   conversion of argument 2 would be ill-formed:
0_0_38716575_13388.cpp:71:35: error: cannot bind non-const lvalue reference of type 'std::any&' to an rvalue of type 'std::any'
   71 |                         swap(G[i],vector<int>());
      |                                   ^~~~~~~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/any:190:7: note:   after user-defined conversion: 'std::any::any(_Tp&&) [with _Tp = std::vector<int>; _VTp = std::vector<int>; _Mgr = _Manager_external<std::vector<int> >; typename std::enable_if<(is_copy_constructible_v<_VTp> && (! __is_in_place_type_v<_VTp>)), bool>::type <anonymous> = true]'
  190 |       any(_Tp&& __value)
      |       ^~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/stop_token:37,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/condition_variable:49,
                 from .\stdc++.h:174:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/std_thread.h:319:3: note: candidate: 'void std::swap(thread&, thread&)'
  319 |   swap(thread& __x, thread& __y) noexcept
      |   ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/std_thread.h:319:16: note:   no known conversion for argument 1 from 'std::vector<int>' to 'std::thread&'
  319 |   swap(thread& __x, thread& __y) noexcept
      |        ~~~~~~~~^~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/exception:164,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/stdexcept:38,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/system_error:43,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ios_base.h:46,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/streambuf:43,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/streambuf_iterator.h:35,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iterator:66,
                 from .\stdc++.h:54:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/exception_ptr.h:230:5: note: candidate: 'void std::__exception_ptr::swap(exception_ptr&, exception_ptr&)'
  230 |     swap(exception_ptr& __lhs, exception_ptr& __rhs)
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/exception_ptr.h:230:25: note:   no known conversion for argument 1 from 'std::vector<int>' to 'std::__exception_ptr::exception_ptr&'
  230 |     swap(exception_ptr& __lhs, exception_ptr& __rhs)
      |          ~~~~~~~~~~~~~~~^~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/complex:45,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ccomplex:39,
                 from .\stdc++.h:127:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/sstream:1204:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(basic_stringbuf<_CharT, _Traits, _Alloc>&, basic_stringbuf<_CharT, _Traits, _Alloc>&)'
 1204 |     swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x,
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/sstream:1204:5: note:   template argument deduction/substitution failed:
0_0_38716575_13388.cpp:71:29: note:   'std::vector<int>' is not derived from 'std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>'
   71 |                         swap(G[i],vector<int>());
      |                         ~~~~^~~~~~~~~~~~~~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/sstream:1212:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(basic_istringstream<_CharT, _Traits, _Allocator>&, basic_istringstream<_CharT, _Traits, _Allocator>&)'
 1212 |     swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x,
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/sstream:1212:5: note:   template argument deduction/substitution failed:
0_0_38716575_13388.cpp:71:29: note:   'std::vector<int>' is not derived from 'std::__cxx11::basic_istringstream<_CharT, _Traits, _Allocator>'
   71 |                         swap(G[i],vector<int>());
      |                         ~~~~^~~~~~~~~~~~~~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/sstream:1219:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(basic_ostringstream<_CharT, _Traits, _Allocator>&, basic_ostringstream<_CharT, _Traits, _Allocator>&)'
 1219 |     swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x,
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/sstream:1219:5: note:   template argument deduction/substitution failed:
0_0_38716575_13388.cpp:71:29: note:   'std::vector<int>' is not derived from 'std::__cxx11::basic_ostringstream<_CharT, _Traits, _Allocator>'
   71 |                         swap(G[i],vector<int>());
      |                         ~~~~^~~~~~~~~~~~~~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/sstream:1226:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(basic_stringstream<_CharT, _Traits, _Allocator>&, basic_stringstream<_CharT, _Traits, _Allocator>&)'
 1226 |     swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x,
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/sstream:1226:5: note:   template argument deduction/substitution failed:
0_0_38716575_13388.cpp:71:29: note:   'std::vector<int>' is not derived from 'std::__cxx11::basic_stringstream<_CharT, _Traits, _Allocator>'
   71 |                         swap(G[i],vector<int>());
      |                         ~~~~^~~~~~~~~~~~~~~~~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/regex:68,
                 from .\stdc++.h:181:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/regex.h:896:5: note: candidate: 'template<class _Ch_type, class _Rx_traits> void std::__cxx11::swap(basic_regex<_Ch_type, _Rx_traits>&, basic_regex<_Ch_type, _Rx_traits>&)'
  896 |     swap(basic_regex<_Ch_type, _Rx_traits>& __lhs,
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/regex.h:896:5: note:   template argument deduction/substitution failed:
0_0_38716575_13388.cpp:71:29: note:   'std::vector<int>' is not derived from 'std::__cxx11::basic_regex<_Ch_type, _Rx_traits>'
   71 |                         swap(G[i],vector<int>());
      |                         ~~~~^~~~~~~~~~~~~~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/regex.h:2230:5: note: candidate: 'template<class _Bi_iter, class _Alloc> void std::__cxx11::swap(match_results<_BiIter, _Alloc>&, match_results<_BiIter, _Alloc>&)'
 2230 |     swap(match_results<_Bi_iter, _Alloc>& __lhs,
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/regex.h:2230:5: note:   template argument deduction/substitution failed:
0_0_38716575_13388.cpp:71:29: note:   'std::vector<int>' is not derived from 'std::__cxx11::match_results<_BiIter, _Alloc>'
   71 |                         swap(G[i],vector<int>());
      |                         ~~~~^~~~~~~~~~~~~~~~~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_pair.h:61,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algobase.h:64,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/algorithm:60,
                 from .\stdc++.h:51:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/move.h:196:5: note: candidate: 'constexpr std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = vector<int>; _Require<__not_<__is_tuple_like<_Tp> >, is_move_constructible<_Tp>, is_move_assignable<_Tp> > = void]' (near match)
  196 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/move.h:196:5: note:   conversion of argument 2 would be ill-formed:
0_0_38716575_13388.cpp:71:35: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>'
   71 |                         swap(G[i],vector<int>());
      |                                   ^~~~~~~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/move.h:220:5: note: candidate: 'template<class _Tp, long long unsigned int _Nm> constexpr std::__enable_if_t<std::__is_swappable<_Tp>::value> std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm])'
  220 |     swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/move.h:220:5: note:   template argument deduction/substitu


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-09-28 23:00:06, Gzip enabled