Record Detail

Compile Error

In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp: In instantiation of '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/driver/main.cpp:101:34:   required from here
/in/hashtable.hpp:275:24: error: no matching function for call to 'HashTable<int, int, std::hash<int>, std::equal_to<int> >::Iterator::Iterator(HashTable<int, int, std::hash<int>, std::equal_to<int> >*, __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> > > > > >, std::_Fwd_list_iterator<std::pair<const int, int> >&, bool)'
                 return Iterator(this, buckets.begin() + hashedKey, lItBefore, false);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:88:9: note: candidate: constexpr HashTable<Key, Value, Hash, KeyEqual>::Iterator::Iterator(const HashTable<Key, Value, Hash, KeyEqual>::Iterator&) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]
         Iterator(const Iterator &) = default;
         ^~~~~~~~
/in/hashtable.hpp:88:9: note:   candidate expects 1 argument, 4 provided
/in/hashtable.hpp:78:9: note: candidate: HashTable<Key, Value, Hash, KeyEqual>::Iterator::Iterator(HashTable<Key, Value, Hash, KeyEqual>*, HashTable<Key, Value, Hash, KeyEqual>::Iterator::VectorIterator, HashTable<Key, Value, Hash, KeyEqual>::Iterator::ListIterator) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>; HashTable<Key, Value, Hash, KeyEqual>::Iterator::VectorIterator = __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> > > > > >; HashTable<Key, Value, Hash, KeyEqual>::Iterator::ListIterator = std::_Fwd_list_iterator<std::pair<const int, int> >]
         Iterator(HashTable *hashTable, VectorIterator vectorIt, ListIterator listItBefore) :
         ^~~~~~~~
/in/hashtable.hpp:78:9: note:   candidate expects 3 arguments, 4 provided
/in/hashtable.hpp:72:18: note: candidate: HashTable<Key, Value, Hash, KeyEqual>::Iterator::Iterator(HashTable<Key, Value, Hash, KeyEqual>*) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]
         explicit Iterator(HashTable *hashTable) : hashTable(hashTable) {
                  ^~~~~~~~
/in/hashtable.hpp:72:18: note:   candidate expects 1 argument, 4 provided
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:278:18: error: no matching function for call to 'HashTable<int, int, std::hash<int>, std::equal_to<int> >::Iterator::Iterator(HashTable<int, int, std::hash<int>, std::equal_to<int> >*, __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> > > > > >, std::forward_list<std::pair<const int, int>, std::allocator<std::pair<const int, int> > >::iterator, bool)'
         Iterator it(this, buckets.begin() + hashedKey, bucket.before_begin(), true);
                  ^~
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:88:9: note: candidate: constexpr HashTable<Key, Value, Hash, KeyEqual>::Iterator::Iterator(const HashTable<Key, Value, Hash, KeyEqual>::Iterator&) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]
         Iterator(const Iterator &) = default;
         ^~~~~~~~
/in/hashtable.hpp:88:9: note:   candidate expects 1 argument, 4 provided
/in/hashtable.hpp:78:9: note: candidate: HashTable<Key, Value, Hash, KeyEqual>::Iterator::Iterator(HashTable<Key, Value, Hash, KeyEqual>*, HashTable<Key, Value, Hash, KeyEqual>::Iterator::VectorIterator, HashTable<Key, Value, Hash, KeyEqual>::Iterator::ListIterator) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>; HashTable<Key, Value, Hash, KeyEqual>::Iterator::VectorIterator = __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> > > > > >; HashTable<Key, Value, Hash, KeyEqual>::Iterator::ListIterator = std::_Fwd_list_iterator<std::pair<const int, int> >]
         Iterator(HashTable *hashTable, VectorIterator vectorIt, ListIterator listItBefore) :
         ^~~~~~~~
/in/hashtable.hpp:78:9: note:   candidate expects 3 arguments, 4 provided
/in/hashtable.hpp:72:18: note: candidate: HashTable<Key, Value, Hash, KeyEqual>::Iterator::Iterator(HashTable<Key, Value, Hash, KeyEqual>*) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]
         explicit Iterator(HashTable *hashTable) : hashTable(hashTable) {
                  ^~~~~~~~
/in/hashtable.hpp:72:18: note:   candidate expects 1 argument, 4 provided

Information

Submit By
Type
Submission
Homework
Project 2: Hashing
Language
C++
Submit At
2024-11-13 16:48:05
Judged At
2024-11-13 16:48:05
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes