diff --git a/include/boost/parser/detail/text/config.hpp b/include/boost/parser/detail/text/config.hpp index 2e6f77fb..7df2e4d0 100644 --- a/include/boost/parser/detail/text/config.hpp +++ b/include/boost/parser/detail/text/config.hpp @@ -16,17 +16,15 @@ #endif -// The contents of in libstdc++ is incomplete (e.g. no owning_view) -// before GCC 12. -#if !BOOST_PARSER_USE_CONCEPTS +#if !BOOST_PARSER_USE_CONCEPTS || defined(_MSC_VER) # define BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS 0 #else # define BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS 1 #endif // GCC 12 claims to support 201907L <= __cpp_deduction_guides, but does not. -#if defined(__cpp_deduction_guides) && 201907L <= __cpp_deduction_guides && \ - (!defined(__GNUC__) || 13 <= __GNUC__) +#if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS && defined(__cpp_deduction_guides) && \ + 201907L <= __cpp_deduction_guides && (!defined(__GNUC__) || 13 <= __GNUC__) #define BOOST_PARSER_DETAIL_TEXT_USE_ALIAS_CTAD 1 #else #define BOOST_PARSER_DETAIL_TEXT_USE_ALIAS_CTAD 0 diff --git a/include/boost/parser/detail/text/transcode_view.hpp b/include/boost/parser/detail/text/transcode_view.hpp index 9053efa4..4c333cfa 100644 --- a/include/boost/parser/detail/text/transcode_view.hpp +++ b/include/boost/parser/detail/text/transcode_view.hpp @@ -303,7 +303,7 @@ namespace boost::parser::detail { namespace text { #else template #endif - constexpr detail::project_impl project; + constexpr detail::project_impl project{}; #if BOOST_PARSER_DETAIL_TEXT_USE_ALIAS_CTAD diff --git a/include/boost/parser/transcode_view.hpp b/include/boost/parser/transcode_view.hpp index 3a53b07b..4832beb4 100644 --- a/include/boost/parser/transcode_view.hpp +++ b/include/boost/parser/transcode_view.hpp @@ -37,7 +37,7 @@ namespace boost::parser { #else -#if BOOST_PARSER_USE_CONCEPTS +#if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS template requires std::ranges::view #else @@ -47,7 +47,7 @@ namespace boost::parser { { public: constexpr utf8_view() -#if BOOST_PARSER_USE_CONCEPTS +#if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS requires std::default_initializable #endif = default; @@ -55,7 +55,7 @@ namespace boost::parser { detail::text::utf_view{std::move(base)} {} }; -#if BOOST_PARSER_USE_CONCEPTS +#if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS template requires std::ranges::view #else @@ -65,7 +65,7 @@ namespace boost::parser { { public: constexpr utf16_view() -#if BOOST_PARSER_USE_CONCEPTS +#if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS requires std::default_initializable #endif = default; @@ -73,7 +73,7 @@ namespace boost::parser { detail::text::utf_view{std::move(base)} {} }; -#if BOOST_PARSER_USE_CONCEPTS +#if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS template requires std::ranges::view #else @@ -83,7 +83,7 @@ namespace boost::parser { { public: constexpr utf32_view() -#if BOOST_PARSER_USE_CONCEPTS +#if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS requires std::default_initializable #endif = default; @@ -92,7 +92,7 @@ namespace boost::parser { {} }; -#if BOOST_PARSER_USE_CONCEPTS +#if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS template utf8_view(R &&) -> utf8_view>; template