Skip to content

Commit 5d99034

Browse files
committed
Pass the sentinel type as a template parameter to the iterator template in
project_view, as a workaround to the presence/absence of a disambiguating template keyword in iterator's implementation. Neither adding it nor temoving it works for all builds. Also, re-enable the C++17 MSVC 2022 Github build. Fixes #252.
1 parent b2927ab commit 5d99034

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

include/boost/parser/detail/text/transcode_view.hpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,14 @@ namespace boost::parser::detail { namespace text {
8888
{
8989
V base_ = V();
9090

91-
public:
92-
template<bool Const>
93-
class iterator;
91+
// HACK: SentType is here to work around irritating big-3
92+
// implementation inconsistencies.
9493
template<bool Const>
9594
class sentinel;
95+
template<bool Const, typename SentType = sentinel<Const>>
96+
class iterator;
9697

98+
public:
9799
constexpr project_view()
98100
#if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS
99101
requires std::default_initializable<V>
@@ -140,7 +142,7 @@ namespace boost::parser::detail { namespace text {
140142
#else
141143
template<typename V, typename F>
142144
#endif
143-
template<bool Const>
145+
template<bool Const, typename SentType>
144146
class project_view<V, F>::iterator
145147
: public boost::parser::detail::stl_interfaces::proxy_iterator_interface<
146148
iterator<Const>,
@@ -161,7 +163,7 @@ namespace boost::parser::detail { namespace text {
161163
decltype(detail::function_for_tag<F>(0))
162164
#endif
163165
;
164-
using sentinel = project_view<V, F>::template sentinel<Const>;
166+
using sentinel = SentType;
165167

166168
friend boost::parser::detail::stl_interfaces::access;
167169
iterator_type & base_reference() noexcept { return it_; }

0 commit comments

Comments
 (0)