Skip to content

Commit e032524

Browse files
Remove iterator specialization (#59)
1 parent f83e16f commit e032524

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

include/msd/blocking_iterator.hpp

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,21 @@ class blocking_iterator {
2828
*/
2929
using reference = const typename Channel::value_type&;
3030

31+
/**
32+
* @brief Supporting single-pass reading of elements.
33+
*/
34+
using iterator_category = std::input_iterator_tag;
35+
36+
/**
37+
* @brief Signed integral type for iterator difference.
38+
*/
39+
using difference_type = std::ptrdiff_t;
40+
41+
/**
42+
* @brief Pointer type to the value_type.
43+
*/
44+
using pointer = const value_type*;
45+
3146
/**
3247
* @brief Constructs a blocking iterator from a channel reference.
3348
*
@@ -75,16 +90,4 @@ class blocking_iterator {
7590

7691
} // namespace msd
7792

78-
/**
79-
* @brief Input iterator specialization
80-
*/
81-
/// \cond
82-
template <typename T>
83-
struct std::iterator_traits<msd::blocking_iterator<T>> {
84-
using value_type = typename msd::blocking_iterator<T>::value_type;
85-
using reference = typename msd::blocking_iterator<T>::reference;
86-
using iterator_category = std::input_iterator_tag;
87-
};
88-
/// \endcond
89-
9093
#endif // MSD_CHANNEL_BLOCKING_ITERATOR_HPP_

0 commit comments

Comments
 (0)