Skip to content

[mdspan.accessor.aligned.overview] Remove std:: in example#8264

Merged
tkoeppe merged 1 commit into
cplusplus:mainfrom
hewillk:main-span
Oct 31, 2025
Merged

[mdspan.accessor.aligned.overview] Remove std:: in example#8264
tkoeppe merged 1 commit into
cplusplus:mainfrom
hewillk:main-span

Conversation

@hewillk

@hewillk hewillk commented Sep 29, 2025

Copy link
Copy Markdown
Contributor

We usually don't explicitly spell std:: in examples unless it's really intentional.

@tkoeppe

tkoeppe commented Oct 31, 2025

Copy link
Copy Markdown
Contributor

I tend to agree. @JeffGarland, any library thoughts?

@jwakely

jwakely commented Oct 31, 2025

Copy link
Copy Markdown
Member

We usually don't explicitly spell std:: in examples unless it's really intentional.

I think the opposite is true. The very first code example in the library clause ([alg.func.obj]) uses a qualified name.

@jwakely

jwakely commented Oct 31, 2025

Copy link
Copy Markdown
Member

See also [ptr.launder], [concept.swappable], [out.ptr.t], ...

We're not consistent though, and this one isn't a complete code example (it has no headers included for a start).

So I guess this is fine, it reduces a bit of visual noise.

@tkoeppe

tkoeppe commented Oct 31, 2025

Copy link
Copy Markdown
Contributor

Hm, I see, we do seem to use both styles. That makes this change less compelling. @hewillk Could you at least survey the rest of the mdspan material to see what other examples are doing?

@hewillk

hewillk commented Oct 31, 2025

Copy link
Copy Markdown
Contributor Author

Hm, I see, we do seem to use both styles. That makes this change less compelling. @hewillk Could you at least survey the rest of the mdspan material to see what other examples are doing?

Most of the other examples do not use spelled namespaces, for example: https://eel.is/c++draft/views#mdspan.sub.sub-7

@hewillk

hewillk commented Oct 31, 2025

Copy link
Copy Markdown
Contributor Author

See also [ptr.launder], [concept.swappable], [out.ptr.t], ...

We're not consistent though, and this one isn't a complete code example (it has no headers included for a start).

So I guess this is fine, it reduces a bit of visual noise.

They all have include headers, which means that namespaces are required for the entire code to be compiled correctly.
So this is what I mean by “unless it's really intentional”.
I think [alg.func.obj] is also intentional, because its example is highly relevant to ADL (i.e., namespace).

@jwakely jwakely left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okey dokey

@tkoeppe

tkoeppe commented Oct 31, 2025

Copy link
Copy Markdown
Contributor

Great, thank you!

@tkoeppe tkoeppe merged commit daf06c9 into cplusplus:main Oct 31, 2025
2 checks passed
@hewillk hewillk deleted the main-span branch October 31, 2025 16:13
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

Successfully merging this pull request may close these issues.

3 participants