include/boost/stl_interfaces/iterator_interface.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/boost/stl_interfaces/iterator_interface.hpp b/include/boost/stl_interfaces/iterator_interface.hpp index ec1e474..aa424b7 100644 --- a/include/boost/stl_interfaces/iterator_interface.hpp +++ b/include/boost/stl_interfaces/iterator_interface.hpp @@ -650,6 +650,8 @@ namespace boost { namespace stl_interfaces { BOOST_STL_INTERFACES_NAMESPACE_V2 { // This iterator concept -> category mapping scheme follows the one // from zip_transform_view; see // https://eel.is/c++draft/range.zip.transform.iterator#1. + // Added the additional case + // (input_iterator_tag && !forward_iterator_tag) -> input_iterator_tag template constexpr auto category_tag() @@ -670,7 +672,11 @@ namespace boost { namespace stl_interfaces { BOOST_STL_INTERFACES_NAMESPACE_V2 { } else { return std::forward_iterator_tag{}; } - } else { + } else if constexpr(std::is_base_of_v< + std::input_iterator_tag, + IteratorConcept>) { + return std::input_iterator_tag{}; + }else { return 0; // int means "no tag" } }