Drops 'const' qualifier
amallia opened this issue · 3 comments
amallia commented
Getting the following error:
/Users/amallia/Development/sera/external/tqdm.cpp/include/tqdm/utils.h:106:12: error: binding value of type 'const std::__1::iterator<std::__1::forward_iterator_tag, ds2i::binary_freq_collection::sequence, long,
ds2i::binary_freq_collection::sequence *, ds2i::binary_freq_collection::sequence &>::value_type' (aka 'const ds2i::binary_freq_collection::sequence') to reference to type
'tqdm::MyIteratorWrapper<ds2i::binary_freq_collection::iterator>::value_type' (aka 'ds2i::binary_freq_collection::sequence') drops 'const' qualifier
return *p;
^~
/Users/amallia/Development/sera/src/create_freq_index.cpp:69:23: note: in instantiation of member function 'tqdm::MyIteratorWrapper<ds2i::binary_freq_collection::iterator>::operator*' requested here
for (auto &&plist : tqdm::tqdm(input)) {
casperdcl commented
if you remove tqdm::tqdm
from the last line (leaving input
unwrapped) does it work?
amallia commented
Yes. Of course
amallia commented
This is the iterator:
class iterator : public std::iterator<std::forward_iterator_tag,
sequence> {
if I change it like this it works:
class iterator : public std::iterator<std::forward_iterator_tag,
const sequence> {
But i feel there is also a bug in tqdm