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:170:46: error: expected ';' before 'i'
HashPrime::num_distinct_sizes_64_bit i = 0;
^
/in/hashtable.hpp:172:17: error: 'i' was not declared in this scope
if (i>=62) { throw std::range_error; }
^
/in/hashtable.hpp:172:48: error: expected primary-expression before ';' token
if (i>=62) { throw std::range_error; }
^
/in/hashtable.hpp:173:38: error: 'i' was not declared in this scope
if (HashPrime::g_a_sizes[i]>=bucketSize && HashPrime::g_a_sizes[i] > std::ceil(static_cast<double>(tableSize / maxLoadFactor)){
^
/in/hashtable.hpp:173:87: error: 'ceil' is not a member of 'std'
if (HashPrime::g_a_sizes[i]>=bucketSize && HashPrime::g_a_sizes[i] > std::ceil(static_cast<double>(tableSize / maxLoadFactor)){
^~~~
/in/hashtable.hpp:173:87: note: suggested alternative: 'cerr'
if (HashPrime::g_a_sizes[i]>=bucketSize && HashPrime::g_a_sizes[i] > std::ceil(static_cast<double>(tableSize / maxLoadFactor)){
^~~~
cerr
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:176:16: error: expected ')' before ';' token
i++;
^
/in/hashtable.hpp:176:16: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
/in/hashtable.hpp:178:37: error: 'i' was not declared in this scope
return HashPrime::g_a_sizes[i];
^
/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:250:18: error: use of deleted function 'HashTable<Key, Value, Hash, KeyEqual>::Iterator::Iterator() [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]'
Iterator it;
^~
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:85:9: note: declared here
Iterator() = delete;
^~~~~~~~
In file included from /in/driver/main.cpp:5:0:
/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:366:23: error: invalid conversion from 'int*' to 'int' [-fpermissive]
return &(*it).second;
^~~~~~
/in/hashtable.hpp:366:23: error: cannot bind rvalue '(int)(& it.HashTable<int, int, std::hash<int>, std::equal_to<int> >::Iterator::operator*().std::pair<const int, int>::second)' to 'int&'
/in/hashtable.hpp: In instantiation of 'bool HashTable<Key, Value, Hash, KeyEqual>::insert(const HashTable<Key, Value, Hash, KeyEqual>::Iterator&, const Key&, const Value&) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]':
/in/hashtable.hpp:305:22: 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:275:37: error: passing 'const HashTable<int, int, std::hash<int>, std::equal_to<int> >::Iterator' as 'this' argument discards qualifiers [-fpermissive]
if(!it.endFlag && keyEqual((*it).first), key){
~^~~~
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:120:19: note: in call to 'HashTable<Key, Value, Hash, KeyEqual>::HashNode& HashTable<Key, Value, Hash, KeyEqual>::Iterator::operator*() [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>; HashTable<Key, Value, Hash, KeyEqual>::HashNode = std::pair<const int, int>]'
HashNode &operator*() {
^~~~~~~~
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:275:24: error: no match for call to '(std::equal_to<int>) (const int&)'
if(!it.endFlag && keyEqual((*it).first), key){
In file included from /usr/include/c++/7/string:48:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/driver/main.cpp:1:
/usr/include/c++/7/bits/stl_function.h:355:7: note: candidate: constexpr bool std::equal_to<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = int]
operator()(const _Tp& __x, const _Tp& __y) const
^~~~~~~~
/usr/include/c++/7/bits/stl_function.h:355:7: note: candidate expects 2 arguments, 1 provided
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:276:14: error: passing 'const HashTable<int, int, std::hash<int>, std::equal_to<int> >::Iterator' as 'this' argument discards qualifiers [-fpermissive]
(*it).second = value;
~^~~~
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:120:19: note: in call to 'HashTable<Key, Value, Hash, KeyEqual>::HashNode& HashTable<Key, Value, Hash, KeyEqual>::Iterator::operator*() [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>; HashTable<Key, Value, Hash, KeyEqual>::HashNode = std::pair<const int, int>]'
HashNode &operator*() {
^~~~~~~~
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:281:22: error: '__gnu_cxx::__alloc_traits<std::allocator<std::forward_list<std::pair<const int, int>, std::allocator<std::pair<const int, int> > > > >::value_type {aka class std::forward_list<std::pair<const int, int>, std::allocator<std::pair<const int, int> > >}' has no member named 'insert_back'; did you mean 'insert_after'?
(buckets[i]).insert_back((*it), key, value);
~~~~~~~~~~~~~^~~~~~~~~~~
insert_after
/in/hashtable.hpp:281:35: error: passing 'const HashTable<int, int, std::hash<int>, std::equal_to<int> >::Iterator' as 'this' argument discards qualifiers [-fpermissive]
(buckets[i]).insert_back((*it), key, value);
~^~~~
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:120:19: note: in call to 'HashTable<Key, Value, Hash, KeyEqual>::HashNode& HashTable<Key, Value, Hash, KeyEqual>::Iterator::operator*() [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>; HashTable<Key, Value, Hash, KeyEqual>::HashNode = std::pair<const int, int>]'
HashNode &operator*() {
^~~~~~~~
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:288:60: error: no match for 'operator>' (operand types are '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> > > > >::iterator {aka __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> > > > > >}' and 'size_t {aka long unsigned int}')
if(firstBucketIt == buckets.end() || firstBucketIt > i){
~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/driver/main.cpp:1:
/usr/include/c++/7/bits/stl_iterator.h:912:5: note: candidate: template<class _Iterator, class _Container> bool __gnu_cxx::operator>(const __gnu_cxx::__normal_iterator<_Iterator, _Container>&, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)
operator>(const __normal_iterator<_Iterator, _Container>& __lhs,
^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:912:5: note: template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:288:60: note: mismatched types 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>' and 'size_t {aka long unsigned int}'
if(firstBucketIt == buckets.end() || firstBucketIt > i){
~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/driver/main.cpp:1:
/usr/include/c++/7/bits/stl_iterator.h:905:5: note: candidate: template<class _IteratorL, class _IteratorR, class _Container> bool __gnu_cxx::operator>(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&)
operator>(const __normal_iterator<_IteratorL, _Container>& __lhs,
^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:905:5: note: template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:288:60: note: mismatched types 'const __gnu_cxx::__normal_iterator<_IteratorR, _Container>' and 'size_t {aka long unsigned int}'
if(firstBucketIt == buckets.end() || firstBucketIt > i){
~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/7/forward_list:38:0,
from /in/hashtable.hpp:6,
from /in/driver/main.cpp:5:
/usr/include/c++/7/bits/forward_list.h:1403:5: note: candidate: template<class _Tp, class _Alloc> bool std::operator>(const std::forward_list<_Tp, _Alloc>&, const std::forward_list<_Tp, _Alloc>&)
operator>(const forward_list<_Tp, _Alloc>& __lx,
^~~~~~~~
/usr/include/c++/7/bits/forward_list.h:1403:5: note: template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:288:60: note: '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> > > > >::iterator {aka __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> > > > > >}' is not derived from 'const std::forward_list<_Tp, _Alloc>'
if(firstBucketIt == buckets.end() || firstBucketIt > i){
~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/7/vector:64:0,
from /usr/include/c++/7/functional:61,
from /in/hashtable.hpp:4,
from /in/driver/main.cpp:5:
/usr/include/c++/7/bits/stl_vector.h:1631:5: note: candidate: template<class _Tp, class _Alloc> bool std::operator>(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)
operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
^~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:1631:5: note: template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:288:60: note: '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> > > > >::iterator {aka __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> > > > > >}' is not derived from 'const std::vector<_Tp, _Alloc>'
if(firstBucketIt == buckets.end() || firstBucketIt > i){
~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/7/bits/node_handle.h:39:0,
from /usr/include/c++/7/bits/hashtable.h:37,
from /usr/include/c++/7/unordered_map:47,
from /usr/include/c++/7/functional:60,
from /in/hashtable.hpp:4,
from /in/driver/main.cpp:5:
/usr/include/c++/7/optional:946:5: note: candidate: template<class _Tp, class _Up> constexpr std::__optional_relop_t<decltype ((declval<_Up>() > declval<_Tp>()))> std::operator>(const _Up&, const std::optional<_Tp>&)
operator>(const _Up& __lhs, const optional<_Tp>& __rhs)
^~~~~~~~
/usr/include/c++/7/optional:946:5: note: template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:288:60: note: mismatched types 'const std::optional<_Tp>' and 'size_t {aka long unsigned int}'
if(firstBucketIt == buckets.end() || firstBucketIt > i){
~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/7/bits/node_handle.h:39:0,
from /usr/include/c++/7/bits/hashtable.h:37,
from /usr/include/c++/7/unordered_map:47,
from /usr/include/c++/7/functional:60,
from /in/hashtable.hpp:4,
from /in/driver/main.cpp:5:
/usr/include/c++/7/optional:940:5: note: candidate: template<class _Tp, class _Up> constexpr std::__optional_relop_t<decltype ((declval<_Tp>() > declval<_Up>()))> std::operator>(const std::optional<_Tp>&, const _Up&)
operator>(const optional<_Tp>& __lhs, const _Up& __rhs)
^~~~~~~~
/usr/include/c++/7/optional:940:5: note: template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:288:60: note: '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> > > > >::iterator {aka __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> > > > > >}' is not derived from 'const std::optional<_Tp>'
if(firstBucketIt == buckets.end() || firstBucketIt > i){
~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/7/bits/node_handle.h:39:0,
from /usr/include/c++/7/bits/hashtable.h:37,
from /usr/include/c++/7/unordered_map:47,
from /usr/include/c++/7/functional:60,
from /in/hashtable.hpp:4,
from /in/driver/main.cpp:5:
/usr/include/c++/7/optional:878:5: note: candidate: template<class _Tp> constexpr bool std::operator>(std::nullopt_t, const std::optional<_Tp>&)
operator>(nullopt_t, const optional<_Tp>& /* __rhs */) noexcept
^~~~~~~~
/usr/include/c++/7/optional:878:5: note: template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:288:60: note: mismatched types 'const std::optional<_Tp>' and 'size_t {aka long unsigned int}'
if(firstBucketIt == buckets.end() || firstBucketIt > i){
~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/7/bits/node_handle.h:39:0,
from /usr/include/c++/7/bits/hashtable.h:37,
from /usr/include/c++/7/unordered_map:47,
from /usr/include/c++/7/functional:60,
from /in/hashtable.hpp:4,
from /in/driver/main.cpp:5:
/usr/include/c++/7/optional:873:5: note: candidate: template<class _Tp> constexpr bool std::operator>(const std::optional<_Tp>&, std::nullopt_t)
operator>(const optional<_Tp>& __lhs, nullopt_t) noexcept
^~~~~~~~
/usr/include/c++/7/optional:873:5: note: template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:288:60: note: '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> > > > >::iterator {aka __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> > > > > >}' is not derived from 'const std::optional<_Tp>'
if(firstBucketIt == buckets.end() || firstBucketIt > i){
~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/7/bits/node_handle.h:39:0,
from /usr/include/c++/7/bits/hashtable.h:37,
from /usr/include/c++/7/unordered_map:47,
from /usr/include/c++/7/functional:60,
from /in/hashtable.hpp:4,
from /in/driver/main.cpp:5:
/usr/include/c++/7/optional:818:5: note: candidate: template<class _Tp, class _Up> constexpr std::__optional_relop_t<decltype ((declval<_Tp>() > declval<_Up>()))> std::operator>(const std::optional<_Tp>&, const std::optional<_Up>&)
operator>(const optional<_Tp>& __lhs, const optional<_Up>& __rhs)
^~~~~~~~
/usr/include/c++/7/optional:818:5: note: template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:288:60: note: '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> > > > >::iterator {aka __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> > > > > >}' is not derived from 'const std::optional<_Tp>'
if(firstBucketIt == buckets.end() || firstBucketIt > i){
~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/7/bits/locale_conv.h:41:0,
from /usr/include/c++/7/locale:43,
from /usr/include/c++/7/iomanip:43,
from /in/driver/main.cpp:2:
/usr/include/c++/7/bits/unique_ptr.h:766:5: note: candidate: template<class _Tp, class _Dp> bool std::operator>(std::nullptr_t, const std::unique_ptr<_Tp, _Dp>&)
operator>(nullptr_t, const unique_ptr<_Tp, _Dp>& __x)
^~~~~~~~
/usr/include/c++/7/bits/unique_ptr.h:766:5: note: template argument deduction/substitution failed:
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp:288:60: note: mismatched types 'const std::unique_ptr<_Tp, _Dp>' and 'size_t {aka long unsigned int}'
if(firstBucketIt == buckets.end() || firstBucketIt > i){