Skip to content

Commit e893b0c

Browse files
authored
find_entry_for() const -> find_entry_for()
- current function returns a mismatch of iterators (const vs non-const) No viable conversion from returned value of type.... 'std::__list_const_iterator<std::pair<int, int>, void *>' ...to function return type... 'ts::map<int, int>::bucket_type::bucket_iterator' ...(aka '__list_iterator<std::pair<int, int>, void *>') - a better solution would be to preserve const-ness, but this will do for now
1 parent 6e7ae1d commit e893b0c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

listings/listing_6.11.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class threadsafe_lookup_table
2020
bucket_data data;
2121
mutable std::shared_mutex mutex;
2222

23-
bucket_iterator find_entry_for(Key const& key) const
23+
bucket_iterator find_entry_for(Key const& key)
2424
{
2525
return std::find_if(data.begin(),data.end(),
2626
[&](bucket_value const& item)

0 commit comments

Comments
 (0)