Skip to content

consider moving requires-clause in a template-head onto the same line as the rest of the template-head where profitable #2510

Open
@zygoloid

Description

@zygoloid

At the moment, we always start a requires-clause in a template-head on a new line, eg:

template<typename T>
  requires is_object_v<T>
struct something {

We should consider whether we can make declarations shorter without sacrificing readability by combining these on the same line:

template<typename T> requires is_object_v<T>
struct something {

Suggestion: someone should try it, produce some before/after screenshots, then we'll make a decision.

Activity

added
decision-requiredA decision of the editorial group (or the Project Editor) is required.
on Nov 26, 2018
jensmaurer

jensmaurer commented on Feb 22, 2019

@jensmaurer
Member

Editorial meeting:

  • If it fits on a single line, we should put that on a single line.
  • Strive for local consistency.
  • Try it out first.
removed
decision-requiredA decision of the editorial group (or the Project Editor) is required.
on Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @zygoloid@jensmaurer

        Issue actions

          consider moving requires-clause in a template-head onto the same line as the rest of the template-head where profitable · Issue #2510 · cplusplus/draft