In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp: In member function 'HashTable<Key, Value, Hash, KeyEqual>::Iterator HashTable<Key, Value, Hash, KeyEqual>::find(const Key&)':
/in/hashtable.hpp:297:9: error: a function-definition is not allowed here before '{' token
{
^
/in/hashtable.hpp:330:9: error: a function-definition is not allowed here before '{' token
{
^
/in/hashtable.hpp:346:9: error: a function-definition is not allowed here before '{' token
{
^
/in/hashtable.hpp:363:9: error: a function-definition is not allowed here before '{' token
{
^
/in/hashtable.hpp:391:9: error: a function-definition is not allowed here before '{' token
{
^
/in/hashtable.hpp:411:9: error: a function-definition is not allowed here before '{' token
{
^
/in/hashtable.hpp:431:29: error: a function-definition is not allowed here before '{' token
size_t size() const { return tableSize; }
^
/in/hashtable.hpp:436:35: error: a function-definition is not allowed here before '{' token
size_t bucketSize() const { return buckets.size(); }
^
/in/hashtable.hpp:441:35: error: a function-definition is not allowed here before '{' token
double loadFactor() const { return (double) tableSize / (double) buckets.size(); }
^
/in/hashtable.hpp:446:41: error: a function-definition is not allowed here before '{' token
double getMaxLoadFactor() const { return maxLoadFactor; }
^
/in/hashtable.hpp:454:9: error: a function-definition is not allowed here before '{' token
{
^
/in/driver/main.cpp: In function 'int main(int, char**)':
/in/driver/main.cpp:78:33: error: 'class HashTableTest<int, int>' has no member named 'bucketSize'; did you mean 'buckets'?
size_t hashTableSize = Test.bucketSize();
^~~~~~~~~~
buckets
/in/driver/main.cpp:111:26: error: 'class HashTableTest<int, int>' has no member named 'insert'
if (Test.insert(key, value)){
^~~~~~
/in/driver/main.cpp:120:26: error: 'class HashTableTest<int, int>' has no member named 'erase'
if (Test.erase(key)){
^~~~~
/in/driver/main.cpp:129:90: error: no match for 'operator[]' (operand types are 'HashTableTest<int, int>' and 'int')
message = "Accessed (" + std::to_string(key) + ", " + std::to_string(Test[key]) + "); ";
^
/in/driver/main.cpp:130:21: error: no match for 'operator[]' (operand types are 'HashTableTest<int, int>' and 'int')
Test[key] = value;
^
/in/driver/main.cpp:131:93: error: no match for 'operator[]' (operand types are 'HashTableTest<int, int>' and 'int')
message += "Updated to (" + std::to_string(key) + ", " + std::to_string(Test[key]) + ").";;
^
/in/driver/main.cpp:139:18: error: 'class HashTableTest<int, int>' has no member named 'bucketSize'; did you mean 'buckets'?
if (Test.bucketSize() != hashTableSize){
^~~~~~~~~~
buckets
/in/driver/main.cpp:140:111: error: 'class HashTableTest<int, int>' has no member named 'bucketSize'; did you mean 'buckets'?
message += " Rehashed table from " + std::to_string(hashTableSize) + " to " + std::to_string(Test.bucketSize()) + ".";
^~~~~~~~~~
buckets
/in/driver/main.cpp:141:34: error: 'class HashTableTest<int, int>' has no member named 'bucketSize'; did you mean 'buckets'?
hashTableSize = Test.bucketSize();
^~~~~~~~~~
buckets
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp: In member function 'HashTable<Key, Value, Hash, KeyEqual>::Iterator HashTable<Key, Value, Hash, KeyEqual>::find(const Key&) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]':
/in/hashtable.hpp:462:5: error: control reaches end of non-void function [-Werror=return-type]
};
^
cc1plus: all warnings being treated as errors