Skip to content

Switch most of our custom algorithms to ranges #2200

@rprospero

Description

@rprospero

Currently, most of our custom algorithms (e.g. for_each_pair) take a beginning and ending iterator. Now that we have moved to C++20, they can instead take a single object that matches the range concept. This has the opportunity to simplify many of the call sites. For example, in src/kernels/geometry.cpp, the line

dissolve::transform_reduce(ParallelPolicies::par, mol.species()->torsions().begin(), mol.species()->torsions().end(),

could become

dissolve::transform_reduce(ParallelPolicies::par, mol.species()->torsions(),

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions