From 39faa9ddbe0233f75028ba0509e69a2a0dc5d0e7 Mon Sep 17 00:00:00 2001 From: Zach Laine Date: Sat, 26 Jul 2025 20:58:50 -0500 Subject: [PATCH] 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. --- .github/workflows/windows.yml | 2 +- include/boost/parser/detail/text/transcode_view.hpp | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 794a493d..87b70a01 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - cxx_std: [20, 23] + cxx_std: [17, 20, 23] os: [windows-2022] runs-on: ${{ matrix.os }} diff --git a/include/boost/parser/detail/text/transcode_view.hpp b/include/boost/parser/detail/text/transcode_view.hpp index 0a06eede..275a5273 100644 --- a/include/boost/parser/detail/text/transcode_view.hpp +++ b/include/boost/parser/detail/text/transcode_view.hpp @@ -88,12 +88,14 @@ namespace boost::parser::detail { namespace text { { V base_ = V(); - public: - template - class iterator; + // HACK: SentType is here to work around irritating big-3 + // implementation inconsistencies. template class sentinel; + template> + class iterator; + public: constexpr project_view() #if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS requires std::default_initializable @@ -140,7 +142,7 @@ namespace boost::parser::detail { namespace text { #else template #endif - template + template class project_view::iterator : public boost::parser::detail::stl_interfaces::proxy_iterator_interface< iterator, @@ -161,7 +163,7 @@ namespace boost::parser::detail { namespace text { decltype(detail::function_for_tag(0)) #endif ; - using sentinel = project_view::template sentinel; + using sentinel = SentType; friend boost::parser::detail::stl_interfaces::access; iterator_type & base_reference() noexcept { return it_; }