foo.cc: In function 'void test(int, int*, int*, int*)':
foo.cc:47:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Vector3>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
47 | for (int i = 0; i < v.size(); i++)
| ~~^~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/c++allocator.h:33,
from /usr/include/c++/9/bits/allocator.h:46,
from /usr/include/c++/9/string:41,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = Vector3; _Args = {Vector3}; _Tp = Vector3]':
/usr/include/c++/9/bits/alloc_traits.h:483:4: required from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = Vector3; _Args = {Vector3}; _Tp = Vector3; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<Vector3>]'
/usr/include/c++/9/bits/vector.tcc:115:30: required from 'void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {Vector3}; _Tp = Vector3; _Alloc = std::allocator<Vector3>]'
/usr/include/c++/9/bits/stl_vector.h:1201:9: required from 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = Vector3; _Alloc = std::allocator<Vector3>; std::vector<_Tp, _Alloc>::value_type = Vector3]'
foo.cc:44:40: required from here
/usr/include/c++/9/ext/new_allocator.h:146:4: error: cannot bind non-const lvalue reference of type 'Vector3&' to an rvalue of type 'Vector3'
146 | { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:17:19: note: initializing argument 1 of 'Vector3::Vector3(Vector3&)'
17 | Vector3(Vector3 &v)
| ~~~~~~~~~^
In file included from /usr/include/c++/9/algorithm:62,
from foo.cc:3:
/usr/include/c++/9/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/9/bits/stl_algo.h:1890:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1976:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:4873:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >]'
foo.cc:46:25: required from here
/usr/include/c++/9/bits/stl_algo.h:1855:3: error: cannot bind non-const lvalue reference of type 'Vector3&' to an rvalue of type 'std::remove_reference<Vector3&>::type' {aka 'Vector3'}
1855 | __val = _GLIBCXX_MOVE(*__i);
| ^~~~~
foo.cc:17:19: note: initializing argument 1 of 'Vector3::Vector3(Vector3&)'
17 | Vector3(Vector3 &v)
| ~~~~~~~~~^
In file included from /usr/include/c++/9/vector:66,
from foo.cc:2:
/usr/include/c++/9/bits/stl_uninitialized.h: In instantiation of '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = std::move_iterator<Vector3*>; _ForwardIterator = Vector3*]':
/usr/include/c++/9/bits/stl_uninitialized.h:307:37: required from '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator<_Tp>&) [with _InputIterator = std::move_iterator<Vector3*>; _ForwardIterator = Vector3*; _Tp = Vector3]'
/usr/include/c++/9/bits/stl_uninitialized.h:329:2: required from '_ForwardIterator std::__uninitialized_move_if_noexcept_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = Vector3*; _ForwardIterator = Vector3*; _Allocator = std::allocator<Vector3>]'
/usr/include/c++/9/bits/vector.tcc:474:3: required from 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {Vector3}; _Tp = Vector3; _Alloc = std::allocator<Vector3>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = Vector3*]'
/usr/include/c++/9/bits/vector.tcc:121:4: required from 'void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {Vector3}; _Tp = Vector3; _Alloc = std::allocator<Vector3>]'
/usr/include/c++/9/bits/stl_vector.h:1201:9: required from 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = Vector3; _Alloc = std::allocator<Vector3>; std::vector<_Tp, _Alloc>::value_type = Vector3]'
foo.cc:44:40: required from here
/usr/include/c++/9/bits/stl_uninitialized.h:127:72: error: static assertion failed: result type must be constructible from value type of input range
127 | static_assert(is_constructible<_ValueType2, decltype(*__first)>::value,
| ^~~~~
In file included from /usr/include/c++/9/bits/stl_algo.h:61,
from /usr/include/c++/9/algorithm:62,
from foo.cc:3:
/usr/include/c++/9/bits/stl_heap.h: In instantiation of 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/9/bits/stl_algo.h:1677:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1938:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1953:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1973:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:4873:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >]'
foo.cc:46:25: required from here
/usr/include/c++/9/bits/stl_heap.h:341:15: error: cannot bind non-const lvalue reference of type 'Vector3&' to an rvalue of type 'std::remove_reference<Vector3&>::type' {aka 'Vector3'}
341 | _ValueType __value = _GLIBCXX_MOVE(*(__first + __parent));
| ^~~~~~~
foo.cc:17:19: note: initializing argument 1 of 'Vector3::Vector3(Vector3&)'
17 | Vector3(Vector3 &v)
| ~~~~~~~~~^
In file included from /usr/include/c++/9/bits/stl_algo.h:61,
from /usr/include/c++/9/algorithm:62,
from foo.cc:3:
/usr/include/c++/9/bits/stl_heap.h:342:22: error: cannot bind non-const lvalue reference of type 'Vector3&' to an rvalue of type 'std::remove_reference<Vector3&>::type' {aka 'Vector3'}
342 | std::__adjust_heap(__first, __parent, __len, _GLIBCXX_MOVE(__value),
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
343 | __comp);
| ~~~~~~~
foo.cc:17:19: note: initializing argument 1 of 'Vector3::Vector3(Vector3&)'
17 | Vector3(Vector3 &v)
| ~~~~~~~~~^
In file included from /usr/include/c++/9/bits/stl_algo.h:61,
from /usr/include/c++/9/algorithm:62,
from foo.cc:3:
/usr/include/c++/9/bits/stl_heap.h:215:26: note: initializing argument 4 of 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Distance = long int; _Tp = Vector3; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
215 | _Distance __len, _Tp __value, _Compare __comp)
| ~~~~^~~~~~~
/usr/include/c++/9/bits/stl_heap.h: In instantiation of 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/9/bits/stl_algo.h:1680:19: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1938:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1953:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1973:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:4873:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >]'
foo.cc:46:25: required from here
/usr/include/c++/9/bits/stl_heap.h:251:18: error: cannot bind non-const lvalue reference of type 'Vector3&' to an rvalue of type 'std::remove_reference<Vector3&>::type' {aka 'Vector3'}
251 | _ValueType __value = _GLIBCXX_MOVE(*__result);
| ^~~~~~~
foo.cc:17:19: note: initializing argument 1 of 'Vector3::Vector3(Vector3&)'
17 | Vector3(Vector3 &v)
| ~~~~~~~~~^
In file included from /usr/include/c++/9/bits/stl_algo.h:61,
from /usr/include/c++/9/algorithm:62,
from foo.cc:3:
/usr/include/c++/9/bits/stl_heap.h:253:25: error: cannot bind non-const lvalue reference of type 'Vector3&' to an rvalue of type 'std::remove_reference<Vector3&>::type' {aka 'Vector3'}
253 | std::__adjust_heap(__first, _DistanceType(0),
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
254 | _DistanceType(__last - __first),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
255 | _GLIBCXX_MOVE(__value), __comp);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:17:19: note: initializing argument 1 of 'Vector3::Vector3(Vector3&)'
17 | Vector3(Vector3 &v)
| ~~~~~~~~~^
In file included from /usr/include/c++/9/bits/stl_algo.h:61,
from /usr/include/c++/9/algorithm:62,
from foo.cc:3:
/usr/include/c++/9/bits/stl_heap.h:215:26: note: initializing argument 4 of 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Distance = long int; _Tp = Vector3; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
215 | _Distance __len, _Tp __value, _Compare __comp)
| ~~~~^~~~~~~
In file included from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/stl_algobase.h: In instantiation of 'void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _ForwardIterator2 = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >]':
/usr/include/c++/9/bits/stl_algo.h:84:20: required from 'void std::__move_median_to_first(_Iterator, _Iterator, _Iterator, _Iterator, _Compare) [with _Iterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1926:34: required from '_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1958:38: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1973:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:4873:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >]'
foo.cc:46:25: required from here
/usr/include/c++/9/bits/stl_algobase.h:151:11: error: no matching function for call to 'swap(Vector3&, Vector3&)'
151 | swap(*__a, *__b);
| ~~~~^~~~~~~~~~~~
In file included from /usr/include/c++/9/bits/nested_exception.h:40,
from /usr/include/c++/9/exception:144,
from /usr/include/c++/9/ios:39,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/move.h:182:5: note: candidate: 'template<class _Tp> typename std::enable_if<std::__and_<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> >::value>::type std::swap(_Tp&, _Tp&)'
182 | swap(_Tp& __a, _Tp& __b)
| ^~~~
/usr/include/c++/9/bits/move.h:182:5: note: template argument deduction/substitution failed:
/usr/include/c++/9/bits/move.h: In substitution of 'template<class _Tp> typename std::enable_if<std::__and_<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> >::value>::type std::swap(_Tp&, _Tp&) [with _Tp = Vector3]':
/usr/include/c++/9/bits/stl_algobase.h:151:11: required from 'void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _ForwardIterator2 = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >]'
/usr/include/c++/9/bits/stl_algo.h:84:20: required from 'void std::__move_median_to_first(_Iterator, _Iterator, _Iterator, _Iterator, _Compare) [with _Iterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1926:34: required from '_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1958:38: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1973:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:4873:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >]'
foo.cc:46:25: required from here
/usr/include/c++/9/bits/move.h:182:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
/usr/include/c++/9/bits/stl_algobase.h: In instantiation of 'void std::iter_swap(_ForwardIterator1, _ForwardIterator2) [with _ForwardIterator1 = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _ForwardIterator2 = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >]':
/usr/include/c++/9/bits/stl_algo.h:84:20: required from 'void std::__move_median_to_first(_Iterator, _Iterator, _Iterator, _Iterator, _Compare) [with _Iterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1926:34: required from '_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1958:38: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:1973:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:4873:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<Vector3*, std::vector<Vector3> >]'
foo.cc:46:25: required from here
/usr/include/c++/9/bits/move.h:205:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> typename std::enable_if<std::__is_swappable<_Tp>::value>::type std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm])'
205 | swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
| ^~~~
/usr/include/c++/9/bits/move.h:205:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/stl_algobase.h:151:11: note: mismatched types '_Tp [_Nm]' and 'Vector3'
151 | swap(*__a, *__b);
| ~~~~^~~~~~~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/stl_pair.h:495:5: note: candidate: 'template<class _T1, class _T2> void std::swap(std::pair<_T1, _T2>&, std::pair<_T1, _T2>&)'
495 | swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
| ^~~~
/usr/include/c++/9/bits/stl_pair.h:495:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/c++/9/bits/stl_algobase.h:151:11: note: 'Vector3' is not derived from 'std::pair<_T1, _T2>'
151 | swap(*__a, *__b);
| ~~~~^~~~~~~~~~~~