Skip to content

inline constexpr friends inject extra keywords #916

@cjdb

Description

@cjdb

Steps to reproduce

  1. Follow Sy Brand's tutorial for setting up Breathe.
  2. Add the following to CatCutifier.h
/**
  A fluffy feline
*/
struct cat {
  /**
    Make this cat look super cute
  */
  void make_cute();

  /// some docs
  constexpr friend bool operator==(cat const x, int const y)
  {
    return true;
  }
};

Expected output

constexpr friend bool operator==(cat const x, int const y)

  some docs

Actual output

inline friend constexpr friend bool operator== (cat const x, int const y)

  some docs

inline should not be present at all, and friend should only appear once.

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

    Issue actions