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

Modernize evolution_replacement test #3

Open
morinim opened this issue Feb 1, 2024 · 0 comments
Open

Modernize evolution_replacement test #3

morinim opened this issue Feb 1, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@morinim
Copy link
Owner

morinim commented Feb 1, 2024

We are forced to use:

const auto [worst_it, best_it] =
    std::ranges::minmax_element(pop | std::views::all,
                                [&eva](const auto &i1, const auto &i2)
                                {
                                  return eva(i1) < eva(i2);
                                });

  const scored_individual worst(*worst_it, eva(*worst_it));
  const scored_individual best(*best_it, eva(*best_it));

instead of:

const auto scored([&eva](const auto &prg)
{
  return scored_individual(prg, eva(prg));
});

const auto [worst, best] =
  std::ranges::minmax(pop | std::views::transform(scored));

because of not very recent clang++ versions (e.g. see llvm/llvm-project#52696)

@morinim morinim added the enhancement New feature or request label Apr 3, 2024
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

1 participant