In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:27:44: error: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
size_t hash = state.playerRow * 31 + state.playerCol;
~~~~ ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/in/sokoban.hpp:29:36: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
hash = hash * 31 + box.first;
~ ~~~~^~~~~
/in/sokoban.hpp:30:36: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
hash = hash * 31 + box.second;
~ ~~~~^~~~~~
/in/sokoban.hpp:46:17: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
grid.resize(rows);
~~~~~~ ^~~~
/in/sokoban.hpp:48:37: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
std::getline(std::cin, grid[i]);
~~~~ ^
/in/sokoban.hpp:53:88: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
return row >= 0 && row < grid.size() && col >= 0 && col < grid[0].length() && grid[row][col] != '#';
~~~~ ^~~
/in/sokoban.hpp:53:93: error: implicit conversion changes signedness: 'int' to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
return row >= 0 && row < grid.size() && col >= 0 && col < grid[0].length() && grid[row][col] != '#';
~~~~ ^~~
/in/sokoban.hpp:53:28: error: comparison of integers of different signs: 'int' and 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-compare]
return row >= 0 && row < grid.size() && col >= 0 && col < grid[0].length() && grid[row][col] != '#';
~~~ ^ ~~~~~~~~~~~
/in/sokoban.hpp:53:61: error: comparison of integers of different signs: 'int' and 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size_type' (aka 'unsigned long') [-Werror,-Wsign-compare]
return row >= 0 && row < grid.size() && col >= 0 && col < grid[0].length() && grid[row][col] != '#';
~~~ ^ ~~~~~~~~~~~~~~~~
In file included from /in/Compile/check.cpp:5:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/unordered_map:47:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/hashtable.h:35:
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/hashtable_policy.h:87:11: error: no matching function for call to object of type 'const StateHash'
noexcept(declval<const _Hash&>()(declval<const _Key&>()))>
^~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/type_traits:144:14: note: in instantiation of template class 'std::__detail::__is_noexcept_hash<std::pair<int, int>, StateHash>' requested here
: public conditional<_B1::value, _B2, _B1>::type
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/type_traits:154:36: note: in instantiation of template class 'std::__and_<std::__is_fast_hash<StateHash>, std::__detail::__is_noexcept_hash<std::pair<int, int>, StateHash> >' requested here
: public __bool_constant<!bool(_Pp::value)>
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/unordered_set.h:45:34: note: in instantiation of template class 'std::__not_<std::__and_<std::__is_fast_hash<StateHash>, std::__detail::__is_noexcept_hash<std::pair<int, int>, StateHash> > >' requested here
typename _Tr = __uset_traits<__cache_default<_Value, _Hash>::value>>
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/unordered_set.h:98:15: note: in instantiation of default argument for '__uset_hashtable<std::pair<int, int>, StateHash, std::equal_to<std::pair<int, int> >, std::allocator<std::pair<int, int> > >' required here
typedef __uset_hashtable<_Value, _Hash, _Pred, _Alloc> _Hashtable;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/sokoban.hpp:62:20: note: in instantiation of template class 'std::unordered_set<std::pair<int, int>, StateHash, std::equal_to<std::pair<int, int> >, std::allocator<std::pair<int, int> > >' requested here
if (targets.count(box)) continue;
^
/in/sokoban.hpp:26:12: note: candidate function not viable: no known conversion from 'const std::pair<int, int>' to 'const GameState' for 1st argument
size_t operator()(const GameState& state) const {
^
In file included from /in/Compile/check.cpp:7:
In file included from /in/sokoban.hpp:5:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/unordered_set:48:
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/unordered_set.h:497:7: error: functions that differ only in their return type cannot be overloaded
insert(node_type&& __nh)
^
/in/sokoban.hpp:62:20: note: in instantiation of template class 'std::unordered_set<std::pair<int, int>, StateHash, std::equal_to<std::pair<int, int> >, std::allocator<std::pair<int, int> > >' requested here
if (targets.count(box)) continue;
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/unordered_set.h:423:7: note: previous declaration is here
insert(value_type&& __x)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/unordered_set.h:502:7: error: multiple overloads of 'insert' instantiate to the same signature 'std::unordered_set<std::pair<int, int>, StateHash, std::equal_to<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::iterator (std::unordered_set<std::pair<int, int>, StateHash, std::equal_to<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::const_iterator, std::unordered_set<std::pair<int, int>, StateHash, std::equal_to<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::node_type &&)' (aka 'int (int, int &&)')
insert(const_iterator, node_type&& __nh)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/unordered_set.h:452:7: note: previous declaration is here
insert(const_iterator __hint, value_type&& __x)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/unordered_set.h:526:7: error: multiple overloads of 'erase' instantiate to the same signature 'std::unordered_set<std::pair<int, int>, StateHash, std::equal_to<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::iterator (std::unordered_set<std::pair<int, int>, StateHash, std::equal_to<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::iterator)' (aka 'int (int)')
erase(iterator __position)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/unordered_set.h:521:7: note: previous declaration is here
erase(const_iterator __position)
^
In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:65:33: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
bool wall_up = grid[row - 1][col] == '#';
~~~~ ~~~~^~~
/in/sokoban.hpp:65:38: error: implicit conversion changes signedness: 'int' to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
bool wall_up = grid[row - 1][col] == '#';
~~~~ ^~~
/in/sokoban.hpp:66:35: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
bool wall_down = grid[row + 1][col] == '#';
~~~~ ~~~~^~~
/in/sokoban.hpp:66:40: error: implicit conversion changes signedness: 'int' to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
bool wall_down = grid[row + 1][col] == '#';
~~~~ ^~~
/in/sokoban.hpp:67:31: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
bool wall_left = grid[row][col - 1] == '#';
~~~~ ^~~
/in/sokoban.hpp:67:40: error: implicit conversion changes signedness: 'int' to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
bool wall_left = grid[row][col - 1] == '#';
~~~~ ~~~~^~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
/in/Compile/Makefile:16: recipe for target 'main' failed
make: *** [main] Error 1