Closed zack-luan closed 1 year ago
The following code encountered an error while compiling streaming.cpp under VS2022:
template struct std::iterator_traits<msd::blocking_iterator> { using value_type = typename msd::blocking_iterator::value_type; using iterator_category = std::output_iterator_tag; };
The error message is as follows: C2794 “reference”: not “std::iterator_traits<_Iter>” ....
following improvements be made?
template struct std::iterator_traits<Yuanling::ThreadSafeChannelIterator> { using value_type = typename Yuanling::ThreadSafeChannelIterator::ValueType; using iterator_category = std::output_iterator_tag; using reference = std::reference_wrapper; };
I'll get to this. Thank you!
The following code encountered an error while compiling streaming.cpp under VS2022:
template
struct std::iterator_traits<msd::blocking_iterator> {
using value_type = typename msd::blocking_iterator::value_type;
using iterator_category = std::output_iterator_tag;
};
The error message is as follows: C2794 “reference”: not “std::iterator_traits<_Iter>” ....
following improvements be made?
template
struct std::iterator_traits<Yuanling::ThreadSafeChannelIterator> {
using value_type = typename Yuanling::ThreadSafeChannelIterator::ValueType;
using iterator_category = std::output_iterator_tag;
using reference = std::reference_wrapper;
};