From 880efcae9b11f1148f49cb7ac52571315be39d37 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sat, 2 Sep 2023 23:44:44 +0300 Subject: [PATCH] Fix missing includes in match_manip.hpp. Use failbit as a dependent name to avoid having to include for std::ios_base::failbit. Add missing includes for enable_if, mpl::true_/mpl::false_ and scoped enums. --- .../spirit/home/karma/stream/detail/format_manip.hpp | 10 ++++++---- .../home/karma/stream/detail/format_manip_auto.hpp | 3 ++- .../boost/spirit/home/karma/stream/format_manip.hpp | 4 +++- .../spirit/home/karma/stream/format_manip_attr.hpp | 2 ++ .../spirit/home/karma/stream/ostream_iterator.hpp | 1 + include/boost/spirit/home/karma/stream/stream.hpp | 3 ++- .../boost/spirit/home/qi/stream/detail/match_manip.hpp | 9 +++++---- .../spirit/home/qi/stream/detail/match_manip_auto.hpp | 2 +- include/boost/spirit/home/qi/stream/match_manip.hpp | 3 ++- 9 files changed, 24 insertions(+), 13 deletions(-) diff --git a/include/boost/spirit/home/karma/stream/detail/format_manip.hpp b/include/boost/spirit/home/karma/stream/detail/format_manip.hpp index a63d71a00e..4e226ada16 100644 --- a/include/boost/spirit/home/karma/stream/detail/format_manip.hpp +++ b/include/boost/spirit/home/karma/stream/detail/format_manip.hpp @@ -10,10 +10,12 @@ #pragma once #endif +#include #include #include #include #include +#include #include /////////////////////////////////////////////////////////////////////////////// @@ -148,7 +150,7 @@ namespace boost { namespace spirit { namespace karma { namespace detail karma::ostream_iterator sink(os); if (!karma::generate (sink, fm.expr)) { - os.setstate(std::ios_base::failbit); + os.setstate(std::basic_ostream::failbit); } return os; } @@ -163,7 +165,7 @@ namespace boost { namespace spirit { namespace karma { namespace detail karma::ostream_iterator sink(os); if (!karma::generate(sink, fm.expr, fm.attr)) { - os.setstate(std::ios_base::failbit); + os.setstate(std::basic_ostream::failbit); } return os; } @@ -177,7 +179,7 @@ namespace boost { namespace spirit { namespace karma { namespace detail karma::ostream_iterator sink(os); if (!karma::generate_delimited(sink, fm.expr, fm.delim, fm.pre)) { - os.setstate(std::ios_base::failbit); + os.setstate(std::basic_ostream::failbit); } return os; } @@ -193,7 +195,7 @@ namespace boost { namespace spirit { namespace karma { namespace detail karma::ostream_iterator sink(os); if (!karma::generate_delimited(sink, fm.expr, fm.delim, fm.pre, fm.attr)) { - os.setstate(std::ios_base::failbit); + os.setstate(std::basic_ostream::failbit); } return os; } diff --git a/include/boost/spirit/home/karma/stream/detail/format_manip_auto.hpp b/include/boost/spirit/home/karma/stream/detail/format_manip_auto.hpp index 9fd4ff5af1..569e6cc297 100644 --- a/include/boost/spirit/home/karma/stream/detail/format_manip_auto.hpp +++ b/include/boost/spirit/home/karma/stream/detail/format_manip_auto.hpp @@ -12,7 +12,8 @@ #include #include -#include +#include +#include /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace spirit { namespace karma { namespace detail diff --git a/include/boost/spirit/home/karma/stream/format_manip.hpp b/include/boost/spirit/home/karma/stream/format_manip.hpp index 2f6c29e7ce..f34db4b0ef 100644 --- a/include/boost/spirit/home/karma/stream/format_manip.hpp +++ b/include/boost/spirit/home/karma/stream/format_manip.hpp @@ -15,6 +15,8 @@ #include #include #include +#include +#include /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace spirit { namespace karma @@ -107,7 +109,7 @@ namespace boost { namespace spirit { namespace karma if (!g.derived().generate(sink, unused, unused, unused)) { - os.setstate(std::ios_base::failbit); + os.setstate(std::basic_ostream::failbit); } return os; } diff --git a/include/boost/spirit/home/karma/stream/format_manip_attr.hpp b/include/boost/spirit/home/karma/stream/format_manip_attr.hpp index 08d53a6d4f..402cec7e90 100644 --- a/include/boost/spirit/home/karma/stream/format_manip_attr.hpp +++ b/include/boost/spirit/home/karma/stream/format_manip_attr.hpp @@ -10,7 +10,9 @@ #include +#include #include +#include #include #include #include diff --git a/include/boost/spirit/home/karma/stream/ostream_iterator.hpp b/include/boost/spirit/home/karma/stream/ostream_iterator.hpp index 0aabfac149..f63b00bd3e 100644 --- a/include/boost/spirit/home/karma/stream/ostream_iterator.hpp +++ b/include/boost/spirit/home/karma/stream/ostream_iterator.hpp @@ -10,6 +10,7 @@ #pragma once #endif +#include #include /////////////////////////////////////////////////////////////////////////////// diff --git a/include/boost/spirit/home/karma/stream/stream.hpp b/include/boost/spirit/home/karma/stream/stream.hpp index 92a5859fdd..69c8dd4b3c 100644 --- a/include/boost/spirit/home/karma/stream/stream.hpp +++ b/include/boost/spirit/home/karma/stream/stream.hpp @@ -27,7 +27,8 @@ #include #include #include -#include +#include +#include #include #include diff --git a/include/boost/spirit/home/qi/stream/detail/match_manip.hpp b/include/boost/spirit/home/qi/stream/detail/match_manip.hpp index 07daaf93ff..ce7d61b3da 100644 --- a/include/boost/spirit/home/qi/stream/detail/match_manip.hpp +++ b/include/boost/spirit/home/qi/stream/detail/match_manip.hpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -155,7 +156,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail input_iterator l; if (!qi::parse(f, l, fm.expr)) { - is.setstate(std::ios_base::failbit); + is.setstate(std::basic_istream::failbit); } return is; } @@ -174,7 +175,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail input_iterator l; if (!qi::parse(f, l, fm.expr, fm.attr)) { - is.setstate(std::ios_base::failbit); + is.setstate(std::basic_istream::failbit); } return is; } @@ -194,7 +195,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail if (!qi::phrase_parse( f, l, fm.expr, fm.skipper, fm.post_skip)) { - is.setstate(std::ios_base::failbit); + is.setstate(std::basic_istream::failbit); } return is; } @@ -216,7 +217,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail if (!qi::phrase_parse( f, l, fm.expr, fm.skipper, fm.post_skip, fm.attr)) { - is.setstate(std::ios_base::failbit); + is.setstate(std::basic_istream::failbit); } return is; } diff --git a/include/boost/spirit/home/qi/stream/detail/match_manip_auto.hpp b/include/boost/spirit/home/qi/stream/detail/match_manip_auto.hpp index f50eda8a17..e66f85fa07 100644 --- a/include/boost/spirit/home/qi/stream/detail/match_manip_auto.hpp +++ b/include/boost/spirit/home/qi/stream/detail/match_manip_auto.hpp @@ -13,7 +13,7 @@ #include #include -#include +#include /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace spirit { namespace qi { namespace detail diff --git a/include/boost/spirit/home/qi/stream/match_manip.hpp b/include/boost/spirit/home/qi/stream/match_manip.hpp index 2632665ae0..3f8e0ed9bc 100644 --- a/include/boost/spirit/home/qi/stream/match_manip.hpp +++ b/include/boost/spirit/home/qi/stream/match_manip.hpp @@ -16,6 +16,7 @@ #include #include #include +#include #include /////////////////////////////////////////////////////////////////////////////// @@ -113,7 +114,7 @@ namespace boost { namespace spirit { namespace qi input_iterator l; if (!p.derived().parse(f, l, unused, unused, unused)) { - is.setstate(std::ios_base::failbit); + is.setstate(std::basic_istream::failbit); } return is; }