Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] make apply sfinae friendly #69

Closed
DenisYaroshevskiy opened this issue Jun 25, 2023 · 1 comment
Closed

[FEATURE] make apply sfinae friendly #69

DenisYaroshevskiy opened this issue Jun 25, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@DenisYaroshevskiy
Copy link

Got hit by this, was annoying.

@DenisYaroshevskiy DenisYaroshevskiy added the enhancement New feature or request label Jun 25, 2023
@sarah-ek
Copy link

somewhat related, the sfinae for for_each is not completely correct

struct A {
  void operator()(auto&&) & {}
};

struct B {
  void operator()(auto&&) && {}
};

auto main() -> int {
  A a;
  B b;
  kumi::for_each(a, kumi::make_tuple(1,2));
  kumi::for_each(b, kumi::make_tuple(1,2));
}

the first for_each fails, when it should succeed
the second for_each fails, but inside the function (for_each) instead of at the sfinae boundary

the sfinae condition should be _::applicable<Function&, Tuple, Tuples...> instead of _::applicable<Function, Tuple, Tuples...>

@jfalcou jfalcou closed this as completed in a2a9dcd Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants