Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions include/msd/blocking_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@ class blocking_iterator {
*/
using reference = const typename Channel::value_type&;

/**
* @brief Supporting single-pass reading of elements.
*/
using iterator_category = std::input_iterator_tag;

/**
* @brief Signed integral type for iterator difference.
*/
using difference_type = std::ptrdiff_t;

/**
* @brief Pointer type to the value_type.
*/
using pointer = const value_type*;

/**
* @brief Constructs a blocking iterator from a channel reference.
*
Expand Down Expand Up @@ -75,16 +90,4 @@ class blocking_iterator {

} // namespace msd

/**
* @brief Input iterator specialization
*/
/// \cond
template <typename T>
struct std::iterator_traits<msd::blocking_iterator<T>> {
using value_type = typename msd::blocking_iterator<T>::value_type;
using reference = typename msd::blocking_iterator<T>::reference;
using iterator_category = std::input_iterator_tag;
};
/// \endcond

#endif // MSD_CHANNEL_BLOCKING_ITERATOR_HPP_