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>::erase(const HashTable<Key, Value, Hash, KeyEqual>::Iterator&) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]':
/in/hashtable.hpp:344:14:   required from '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:366:46: error: passing 'const HashTable<int, int, std::hash<int>, std::equal_to<int> >::Iterator' as 'this' argument discards qualifiers [-fpermissive]
                 while (it.bucketIt->empty()) ++it;
                                              ^~~~
/in/hashtable.hpp:92:19: note:   in call to 'HashTable<Key, Value, Hash, KeyEqual>::Iterator& HashTable<Key, Value, Hash, KeyEqual>::Iterator::operator++() [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]'
         Iterator &operator++() {
                   ^~~~~~~~

Information

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