shoes.cpp: In function 'long long int count_swaps(std::vector<int>)':
shoes.cpp:16:3: error: 'assert' was not declared in this scope
assert(fnd + 1);
^~~~~~
shoes.cpp:16:3: note: suggested alternative: 'short'
assert(fnd + 1);
^~~~~~
short
shoes.cpp:18:4: error: 'swap' was not declared in this scope
swap(s[i], s[i + 1]);
^~~~
shoes.cpp:18:4: note: suggested alternatives:
In file included from /usr/include/c++/7/vector:65:0,
from shoes.h:5,
from shoes.cpp:1:
/usr/include/c++/7/bits/stl_bvector.h:128:3: note: 'std::swap'
swap(bool& __x, _Bit_reference __y) noexcept
^~~~
In file included from /usr/include/c++/7/bits/stl_pair.h:59:0,
from /usr/include/c++/7/bits/stl_algobase.h:64,
from /usr/include/c++/7/vector:60,
from shoes.h:5,
from shoes.cpp:1:
/usr/include/c++/7/bits/move.h:187:5: note: 'std::swap'
swap(_Tp& __a, _Tp& __b)
^~~~
/usr/include/c++/7/bits/move.h:187:5: note: 'std::swap'
In file included from /usr/include/c++/7/exception:142:0,
from /usr/include/c++/7/new:40,
from /usr/include/c++/7/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/7/bits/c++allocator.h:33,
from /usr/include/c++/7/bits/allocator.h:46,
from /usr/include/c++/7/vector:61,
from shoes.h:5,
from shoes.cpp:1:
/usr/include/c++/7/bits/exception_ptr.h:166:5: note: 'std::__exception_ptr::swap'
swap(exception_ptr& __lhs, exception_ptr& __rhs)
^~~~
shoes.cpp:22:13: error: 'swap' was not declared in this scope
swap(s[2 * pos], s[2 * pos + 1]);
^~~~
shoes.cpp:22:13: note: suggested alternatives:
In file included from /usr/include/c++/7/vector:65:0,
from shoes.h:5,
from shoes.cpp:1:
/usr/include/c++/7/bits/stl_bvector.h:128:3: note: 'std::swap'
swap(bool& __x, _Bit_reference __y) noexcept
^~~~
In file included from /usr/include/c++/7/bits/stl_pair.h:59:0,
from /usr/include/c++/7/bits/stl_algobase.h:64,
from /usr/include/c++/7/vector:60,
from shoes.h:5,
from shoes.cpp:1:
/usr/include/c++/7/bits/move.h:187:5: note: 'std::swap'
swap(_Tp& __a, _Tp& __b)
^~~~
/usr/include/c++/7/bits/move.h:187:5: note: 'std::swap'
In file included from /usr/include/c++/7/exception:142:0,
from /usr/include/c++/7/new:40,
from /usr/include/c++/7/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/7/bits/c++allocator.h:33,
from /usr/include/c++/7/bits/allocator.h:46,
from /usr/include/c++/7/vector:61,
from shoes.h:5,
from shoes.cpp:1:
/usr/include/c++/7/bits/exception_ptr.h:166:5: note: 'std::__exception_ptr::swap'
swap(exception_ptr& __lhs, exception_ptr& __rhs)
^~~~