In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:131:46: error: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
size_t new_px = current.player_x + dx[i];
~~~~~~ ~~~~~~~~~~~~~~~~~^~~~~~~
/in/sokoban.hpp:132:46: error: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
size_t new_py = current.player_y + dy[i];
~~~~~~ ~~~~~~~~~~~~~~~~~^~~~~~~
/in/sokoban.hpp:143:42: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
size_t new_bx = new_px + dx[i];
~ ^~~~~
/in/sokoban.hpp:144:42: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
size_t new_by = new_py + dy[i];
~ ^~~~~
/in/sokoban.hpp:84:21: error: implicit conversion loses integer precision: 'std::vector::size_type' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
int rows = grid.size();
~~~~ ~~~~~^~~~~~
/in/sokoban.hpp:85:24: error: implicit conversion loses integer precision: 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size_type' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
int cols = grid[0].size();
~~~~ ~~~~~~~~^~~~~~
/in/sokoban.hpp:91:26: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
for (size_t y = 0; y < rows; ++y) {
~ ^ ~~~~
/in/sokoban.hpp:92:30: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
for (size_t x = 0; x < cols; ++x) {
~ ^ ~~~~
/in/sokoban.hpp:94:28: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
player_x = x;
~ ^
/in/sokoban.hpp:95:28: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
player_y = y;
~ ^
/in/sokoban.hpp:134:35: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
if (!is_within_bounds(new_px, new_py, rows, cols) || !is_walkable(grid, new_px, new_py)) {
~~~~~~~~~~~~~~~~ ^~~~~~
/in/sokoban.hpp:134:43: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
if (!is_within_bounds(new_px, new_py, rows, cols) || !is_walkable(grid, new_px, new_py)) {
~~~~~~~~~~~~~~~~ ^~~~~~
/in/sokoban.hpp:139:35: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
next_state.player_x = new_px;
~ ^~~~~~
/in/sokoban.hpp:140:35: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
next_state.player_y = new_py;
~ ^~~~~~
/in/sokoban.hpp:146:39: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
if (!is_within_bounds(new_bx, new_by, rows, cols) || !is_walkable(grid, new_bx, new_by)) {
~~~~~~~~~~~~~~~~ ^~~~~~
/in/sokoban.hpp:146:47: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
if (!is_within_bounds(new_bx, new_by, rows, cols) || !is_walkable(grid, new_bx, new_by)) {
~~~~~~~~~~~~~~~~ ^~~~~~
In file included from /in/Compile/check.cpp:1:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/ios:40:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/char_traits.h:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algobase.h:71:
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/predefined_ops.h:241:17: error: invalid operands to binary expression ('std::pair<int, int>' and 'const std::pair<unsigned long, unsigned long>')
{ return *__it == _M_value; }
~~~~~ ^ ~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algo.h:120:8: note: in instantiation of function template specialization '__gnu_cxx::__ops::_Iter_equals_val<const std::pair<unsigned long, unsigned long> >::operator()<__gnu_cxx::__normal_iterator<std::pair<int, int> *, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > > >' requested here
if (__pred(__first))
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algo.h:161:14: note: in instantiation of function template specialization 'std::__find_if<__gnu_cxx::__normal_iterator<std::pair<int, int> *, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > >, __gnu_cxx::__ops::_Iter_equals_val<const std::pair<unsigned long, unsigned long> > >' requested here
return __find_if(__first, __last, __pred,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_algo.h:3907:19: note: in instantiation of function template specialization 'std::__find_if<__gnu_cxx::__normal_iterator<std::pair<int, int> *, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > >, __gnu_cxx::__ops::_Iter_equals_val<const std::pair<unsigned long, unsigned long> > >' requested here
return std::__find_if(__first, __last,
^
/in/sokoban.hpp:142:22: note: in instantiation of function template specialization 'std::find<__gnu_cxx::__normal_iterator<std::pair<int, int> *, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > >, std::pair<unsigned long, unsigned long> >' requested here
if (std::find(next_state.boxes.begin(), next_state.boxes.end(), std::make_pair(new_px, new_py)) != next_state.boxes.end()) {
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/system_error:292:3: note: candidate function not viable: no known conversion from 'std::pair<int, int>' to 'const std::error_code' for 1st argument
operator==(const error_code& __lhs, const error_code& __rhs) noexcept
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/system_error:297:3: note: candidate function not viable: no known conversion from 'std::pair<int, int>' to 'const std::error_code' for 1st argument
operator==(const error_code& __lhs, const error_condition& __rhs) noexcept
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/system_error:304:3: note: candidate function not viable: no known conversion from 'std::pair<int, int>' to 'const std::error_condition' for 1st argument
operator==(const error_condition& __lhs, const error_code& __rhs) noexcept
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/system_error:311:3: note: candidate function not viable: no known conversion from 'std::pair<int, int>' to 'const std::error_condition' for 1st argument
operator==(const error_condition& __lhs,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_pair.h:448:5: note: candidate template ignored: deduced conflicting types for parameter '_T1' ('int' vs. 'unsigned long')
operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/postypes.h:216:5: note: candidate template ignored: could not match 'fpos' against 'pair'
operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_iterator.h:302:5: note: candidate template ignored: could not match 'reverse_iterator' against 'pair'
operator==(const reverse_iterator<_Iterator>& __x,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_iterator.h:340:5: note: candidate template ignored: could not match 'reverse_iterator' against 'pair'
operator==(const reverse_iterator<_IteratorL>& __x,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_iterator.h:862:5: note: candidate template ignored: could not match '__normal_iterator' against 'pair'
operator==(const __normal_iterator<_IteratorL, _Container>& __lhs,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_iterator.h:869:5: note: candidate template ignored: could not match '__normal_iterator' against 'pair'
operator==(const __normal_iterator<_Iterator, _Container>& __lhs,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_iterator.h:1121:5: note: candidate template ignored: could not match 'move_iterator' against 'pair'
operator==(const move_iterator<_IteratorL>& __x,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_iterator.h:1127:5: note: candidate template ignored: could not match 'move_iterator' against 'pair'
operator==(const move_iterator<_Iterator>& __x,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/allocator.h:146:5: note: candidate template ignored: could not match 'allocator' against 'pair'
operator==(const allocator<_T1>&, const allocator<_T2>&)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/allocator.h:152:5: note: candidate template ignored: could not match 'allocator' against 'pair'
operator==(const allocator<_Tp>&, const allocator<_Tp>&)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/string_view:450:5: note: candidate template ignored: could not match 'basic_string_view' against 'pair'
operator==(basic_string_view<_CharT, _Traits> __x,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/string_view:456:5: note: candidate template ignored: could not match 'basic_string_view' against 'pair'
operator==(basic_string_view<_CharT, _Traits> __x,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/string_view:462:5: note: candidate template ignored: could not match 'basic_string_view' against 'pair'
operator==(__detail::__idt<basic_string_view<_CharT, _Traits>> __x,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/basic_string.h:6009:5: note: candidate template ignored: could not match 'basic_string' against 'pair'
operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/basic_string.h:6017:5: note: candidate template ignored: could not match 'basic_string' against 'pair'
operator==(const basic_string<_CharT>& __lhs,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/basic_string.h:6031:5: note: candidate template ignored: could not match 'const _CharT *' against 'std::pair<int, int>'
operator==(const _CharT* __lhs,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/basic_string.h:6043:5: note: candidate template ignored: could not match 'basic_string' against 'pair'
operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/streambuf_iterator.h:204:5: note: candidate template ignored: could not match 'istreambuf_iterator' against 'pair'
operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_vector.h:1601:5: note: candidate template ignored: could not match 'vector' against 'pair'
operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/array:252:5: note: candidate template ignored: could not match 'array' against 'pair'
operator==(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/tuple:1397:5: note: candidate template ignored: could not match 'tuple' against 'pair'
operator==(const tuple<_TElements...>& __t,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/optional:792:5: note: candidate template ignored: could not match 'optional' against 'pair'
operator==(const optional<_Tp>& __lhs, const optional<_Up>& __rhs)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/optional:843:5: note: candidate template ignored: could not match 'optional' against 'pair'
operator==(const optional<_Tp>& __lhs, nullopt_t) noexcept
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/optional:848:5: note: candidate template ignored: could not match 'optional' against 'pair'
operator==(nullopt_t, const optional<_Tp>& __rhs) noexcept
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/optional:904:5: note: candidate template ignored: could not match 'optional' against 'pair'
operator==(const optional<_Tp>& __lhs, const _Up& __rhs)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/optional:910:5: note: candidate template ignored: could not match 'optional' against 'pair'
operator==(const _Up& __lhs, const optional<_Tp>& __rhs)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/unordered_map.h:1125:2: note: candidate template ignored: could not match 'unordered_map' against 'pair'
operator==(const unordered_map<_Key1, _Tp1, _Hash1, _Pred1, _Alloc1>&,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/unordered_map.h:1916:5: note: candidate template ignored: could not match 'unordered_multimap' against 'pair'
operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_deque.h:267:5: note: candidate template ignored: could not match '_Deque_iterator' against 'pair'
operator==(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_deque.h:274:5: note: candidate template ignored: could not match '_Deque_iterator' against 'pair'
operator==(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_deque.h:2258:5: note: candidate template ignored: could not match 'deque' against 'pair'
operator==(const deque<_Tp, _Alloc>& __x,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stl_queue.h:318:5: note: candidate template ignored: could not match 'queue' against 'pair'
operator==(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/unordered_set.h:803:9: note: candidate template ignored: could not match 'unordered_set' against 'pair'
operator==(const unordered_set<_Value1, _Hash1, _Pred1, _Alloc1>&,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/unordered_set.h:1547:5: note: candidate template ignored: could not match 'unordered_multiset' against 'pair'
operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
^
17 errors generated.
/in/Compile/Makefile:16: recipe for target 'main' failed
make: *** [main] Error 1