boostorg / spirit

Boost.org spirit module
http://boost.org/libs/spirit
394 stars 162 forks source link

Fix missing includes in `match_manip.hpp` #767

Closed Lastique closed 1 year ago

Lastique commented 1 year ago

Use failbit as a dependent name to avoid having to include <ios> for std::ios_base::failbit.

Add missing includes for enable_if and mpl::true_/mpl::false_.

Flamefire commented 1 year ago

This misses a couple of other uses of std::ios_base::failbit, e.g. in include/boost/spirit/home/karma/stream/format_manip.hpp & include/boost/spirit/home/karma/stream/detail/format_manip.hpp, see https://github.com/Flamefire/spirit/actions/runs/6442261776/job/17492909668 & https://github.com/boostorg/spirit/pull/774

Lastique commented 1 year ago

I've added a few more workarounds, but it looks like missing includes are all over Boost.Spirit.

This PR is not meant to be an exhaustive fix for this problem, just something I found during the switch to invoke_swap.

Flamefire commented 1 year ago

Interesting that you seem to have required more changes, I added much less to make the test PR pass

Anyway it's a good way forward.

Lastique commented 1 year ago

On October 8, 2023 12:29:09 PM Alexander Grund @.***> wrote:

Interesting that you seem to have required more changes, I added much less to make the test PR pass

My original set of changes were enough to get the tests passing for me. The added ones are what you pointed out and what caught my eye while I was fixing those.

Flamefire commented 1 year ago

My original set of changes were enough to get the tests passing for me. The added ones are what you pointed out and what caught my eye while I was fixing those.

I see makes sense. I tested your changes in #774 and it passes CI so this is good to merge :+1: