Skip to content

Which codeblocks should contain "namespace std"? #1168

Closed
@tkoeppe

Description

@tkoeppe

Header synopses always contain namespace std { .... When we describe the header content in detail, we often repeat namespace std {, e.g. in "Class template vector".

However, we sometimes don't repeat the namespace for specifications. Examples are "optional", "polymorphic_memory_resource", and "linear_congruential_engine".

(Note that I am not talking about itemdecls; those never state the namespace.)

We should decide whether to state the namespace in those detailed definitions, and then apply that style consistently and record it in the wiki.

I think the majority use at the moment is to state the namespace, but that doesn't need to be a deciding factor. Note also that some class templates live in further nested namespaces, so there may be some value in being explicit.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions