Hello,

Today I am making my first posts to this group. Please forgive me if I make mistakes. Thank you.

Here is the context:

Header <stop_token>:

[[nodiscard]] friend bool operator==(const stop_token& lhs, const stop_token& rhs) noexcept;

I would have thought that this should be:

friend [[nodiscard]] bool operator==(const stop_token& lhs, const stop_token& rhs) noexcept;

i.e. the attribute pertains to the function, not to the friend declaration,
but I was told that an attribute cannot appear in this position,
hence it must be as it is in <stop_token>.

Perhaps the grammar should be amended to allow an attribute in this position?

What do you think?

Thank you,

Robert Schwartz