Is there a style option for aligning trailing return types?
Example:
auto operator=(const Vector2&) noexcept -> Vector2& = default;
auto operator=(Vector2&&) noexcept -> Vector2& = default;
auto operator+=(const Vector2& other) noexcept -> Vector2&;
auto operator-=(const Vector2& other) noexcept -> Vector2&;
auto operator*=(const T& scalar) noexcept -> Vector2&;
auto operator*=(const Vector2& other) noexcept -> Vector2&;
auto operator/=(const T& scalar) noexcept -> Vector2&;
auto operator/=(const Vector2& other) noexcept -> Vector2&;
[[nodiscard]] auto operator<=>(const Vector2& other) const noexcept -> std::strong_ordering;
[[nodiscard]] auto operator+(const Vector2& other) const noexcept -> Vector2;
[[nodiscard]] auto operator-(const Vector2& other) const noexcept -> Vector2;
[[nodiscard]] auto operator*(const T& scalar) const noexcept -> Vector2;
[[nodiscard]] auto operator*(const Vector2& other) const noexcept -> Vector2;
[[nodiscard]] auto operator/(const T& scalar) const noexcept -> Vector2;
[[nodiscard]] auto operator/(const Vector2& other) const noexcept -> Vector2;
If there is not a style option currently achieving this, I suggest it should be added because it really helps understanding what a method does when skimming through crowded classes.
Way easier than this:
auto operator=(const Vector2&) noexcept -> Vector2& = default;
auto operator=(Vector2&&) noexcept -> Vector2& = default;
auto operator+=(const Vector2& other) noexcept -> Vector2&;
auto operator-=(const Vector2& other) noexcept -> Vector2&;
auto operator*=(const T& scalar) noexcept -> Vector2&;
auto operator*=(const Vector2& other) noexcept -> Vector2&;
auto operator/=(const T& scalar) noexcept -> Vector2&;
auto operator/=(const Vector2& other) noexcept -> Vector2&;
[[nodiscard]] auto operator<=>(const Vector2& other) const noexcept -> std::strong_ordering;
[[nodiscard]] auto operator+(const Vector2& other) const noexcept -> Vector2;
[[nodiscard]] auto operator-(const Vector2& other) const noexcept -> Vector2;
[[nodiscard]] auto operator*(const T& scalar) const noexcept -> Vector2;
[[nodiscard]] auto operator*(const Vector2& other) const noexcept -> Vector2;
[[nodiscard]] auto operator/(const T& scalar) const noexcept -> Vector2;
[[nodiscard]] auto operator/(const Vector2& other) const noexcept -> Vector2;
Is there a style option for aligning trailing return types?
Example:
If there is not a style option currently achieving this, I suggest it should be added because it really helps understanding what a method does when skimming through crowded classes.
Way easier than this: