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

[ranges] Format of && expression #6178

Open
hewillk opened this issue Mar 13, 2023 · 1 comment
Open

[ranges] Format of && expression #6178

hewillk opened this issue Mar 13, 2023 · 1 comment

Comments

@hewillk
Copy link
Contributor

hewillk commented Mar 13, 2023

There are currently two styles for the formatting of long logic expressions, that is, && is at the end:

  template<input_­range V, forward_­range Pattern>
    requires view<V> && view<Pattern> &&
             indirectly_­comparable<iterator_t<V>, iterator_t<Pattern>, ranges::equal_to> &&
             (forward_­range<V> || tiny-range<Pattern>)
  class lazy_split_view;

or front:

  template<input_range V, forward_range Pattern>
    requires view<V> && input_range<range_reference_t<V>>
          && view<Pattern>
          && compatible-joinable-ranges<range_reference_t<V>, Pattern>
  class join_with_view;

Is it necessary to unify the format, or is such change not worth much?

@jensmaurer
Copy link
Member

jensmaurer commented Mar 13, 2023

We try to follow a common style in the standard library, and I feel the former is more prevalent than the latter, e.g. also in [partial.sort].

So, while this is an area of diminishing returns, personally, I think unification is editorially-good.

Let's ask @jwakely before you sink a lot of time into it.

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

No branches or pull requests

2 participants