In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp: In member function 'size_t HashTable<Key, Value, Hash, KeyEqual>::findMinimumBucketSize(size_t) const':
/in/hashtable.hpp:171:63: error: a function-definition is not allowed here before '{' token
size_t findMinimumBucketSize(size_t bucketSize) const {
^
/in/hashtable.hpp:186:5: error: no return statement in function returning non-void [-Werror=return-type]
}
^
/in/hashtable.hpp: In instantiation of 'bool HashTable<Key, Value, Hash, KeyEqual>::erase(const Key&) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]':
/in/driver/main.cpp:120:35: required from here
/in/hashtable.hpp:380:20: error: 'class std::forward_list<std::pair<const int, int>, std::allocator<std::pair<const int, int> > >' has no member named 'erase'; did you mean '_Base'?
bucket.erase(nodeIt);
~~~~~~~^~~~~
_Base
/in/hashtable.hpp: In instantiation of 'Value& HashTable<Key, Value, Hash, KeyEqual>::operator[](const Key&) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]':
/in/driver/main.cpp:129:94: required from here
/in/hashtable.hpp:446:8: error: no match for 'operator=' (operand types are 'HashTable<int, int, std::hash<int>, std::equal_to<int> >::Iterator' and 'bool')
it = insert(key, Value());
~~~^~~~~~~~~~~~~~~~~~~~~~
/in/hashtable.hpp:89:19: note: candidate: constexpr HashTable<Key, Value, Hash, KeyEqual>::Iterator& HashTable<Key, Value, Hash, KeyEqual>::Iterator::operator=(const HashTable<Key, Value, Hash, KeyEqual>::Iterator&) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]
Iterator &operator=(const Iterator &) = default;
^~~~~~~~
/in/hashtable.hpp:89:19: note: no known conversion for argument 1 from 'bool' to 'const HashTable<int, int, std::hash<int>, std::equal_to<int> >::Iterator&'
/in/hashtable.hpp: In instantiation of 'size_t HashTable<Key, Value, Hash, KeyEqual>::findMinimumBucketSize(size_t) const [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>; size_t = long unsigned int]':
/in/hashtable.hpp:461:39: required from 'void HashTable<Key, Value, Hash, KeyEqual>::rehash(size_t) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>; size_t = long unsigned int]'
/in/hashtable.hpp:359:15: required from 'bool HashTable<Key, Value, Hash, KeyEqual>::insert(const Key&, const Value&) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]'
/in/driver/main.cpp:111:43: required from here
/in/hashtable.hpp:169:41: error: unused parameter 'bucketSize' [-Werror=unused-parameter]
size_t findMinimumBucketSize(size_t bucketSize) const {
^~~~~~~~~~
In file included from /usr/include/c++/7/functional:64:0,
from /in/hashtable.hpp:4,
from /in/driver/main.cpp:5:
/usr/include/c++/7/bits/stl_algo.h: At global scope:
/usr/include/c++/7/bits/stl_algo.h:3923:5: error: '_IIter std::find_if(_IIter, _IIter, _Predicate) [with _IIter = __gnu_cxx::__normal_iterator<std::forward_list<std::pair<const int, int>, std::allocator<std::pair<const int, int> > >*, std::vector<std::forward_list<std::pair<const int, int>, std::allocator<std::pair<const int, int> > >, std::allocator<std::forward_list<std::pair<const int, int>, std::allocator<std::pair<const int, int> > > > > >; _Predicate = HashTable<Key, Value, Hash, KeyEqual>::erase(const Key&) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]::<lambda(const HashNodeList&)>]', declared using local type 'HashTable<Key, Value, Hash, KeyEqual>::erase(const Key&) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]::<lambda(const HashNodeList&)>', is used but never defined [-fpermissive]
find_if(_InputIterator __first, _InputIterator __last,
^~~~~~~
cc1plus: all warnings being treated as errors