Skip to content

Prepare and_then/map/transform/map_error/or_else for SFINAE-friendliness - #99

Open
Quuxplusone wants to merge 1 commit into
TartanLlama:masterfrom
Quuxplusone:sfinae-groundwork
Open

Prepare and_then/map/transform/map_error/or_else for SFINAE-friendliness#99
Quuxplusone wants to merge 1 commit into
TartanLlama:masterfrom
Quuxplusone:sfinae-groundwork

Conversation

@Quuxplusone

Copy link
Copy Markdown
Contributor

This incidentally simplifies the preprocessor stuff, by making these
codepaths look the same in both C++11 and C++14. The old code had the
weird effect that the C++11 codepath was slightly more SFINAE-friendly
than the C++14 codepath.

This patch doesn't actually make and_then/map/transform/map_error/or_else
be SFINAE-friendly. But it lays the groundwork for adding further
constraints to the enable_if stuff in and_then_impl etc., which
could make these functions fully SFINAE-friendly without needing to
touch the non-_impl versions again.

…ess.

This incidentally simplifies the preprocessor stuff, by making these
codepaths look the same in both C++11 and C++14. The old code had the
weird effect that the C++11 codepath was slightly *more* SFINAE-friendly
than the C++14 codepath.

This patch doesn't actually make and_then/map/transform/map_error/or_else
be SFINAE-friendly. But it lays the groundwork for adding further
constraints to the `enable_if` stuff in `and_then_impl` etc., which
could make these functions fully SFINAE-friendly without needing to
touch the non-`_impl` versions again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant