When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
37 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
stl_iterator_base_funcs.h(205, 7): Error occurred here
main.cpp(23, 10): In instantiation of function template specialization 'std::advance<cvk::generator<Board::pair_depth>::iterator, int>' requested here```
this time it 100% iterator and not range itself 
you have using difference_t =... should be using difference_type = ...
I tend to do that often too
the general rule is anything at namespace level gets _t, and dependant types get _type (iter_value_t vs iterator::value_type)
it still not work 
new error or same?
same...
[build] /usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_iterator_base_funcs.h:205:49: error: no type named 'difference_type' in 'std::iterator_traits<cvk::generator<Board::pair_depth>::iterator>'
[build] 205 | typename iterator_traits<_InputIterator>::difference_type __d = __n;
[build] | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
[build] /home/charaverk/hexchess/server/src/main.cpp:23:10: note: in instantiation of function template specialization 'std::advance<cvk::generator<Board::pair_depth>::iterator, int>' requested here
[build] 23 | std::advance(depth,1);
[build] | ^
[build] 1 error generated.
both in build and clangd
wait forward iterator require ()++
it not satisfy regular concept
so, compare to default sentient is OPTIONAL and not alternative to compare to self
it still need to be able to compare itself
actually make sense
i just deduce to use static assert of concept by this type
after 30 min
can i somehow avoid it?
i mean only if i make it output?
You can make it an output iterator, but if you want to read it should be an input iterator
nvm i just stupid some times, it actually should be input_or_output iterator only
input iterator only requires operator++ and comparison to sentinal type
output iterator is similar, except operator* doesn't have to return a reference
@runic zinc
Please don't delete forum posts. They can be helpful to refer to later and other members can learn from them. In the future you can use !solved to close a post and mark a post as solved.
Thank you and let us know if you have any more questions!
This thread is now set to auto-hide after an hour of inactivity
(not solved), i cant have operator++(int) with this semantics, without it not even satisfy input iterator
so i just decide i will use raw operation and not iterators functions for this one
I think you just have to define operator++(int) and live with the fact that it's wrong