Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some references to "size_t" should probably be "std::size_t"? #295

Closed
mdempsky opened this issue May 9, 2014 · 3 comments
Closed

Some references to "size_t" should probably be "std::size_t"? #295

mdempsky opened this issue May 9, 2014 · 3 comments

Comments

@mdempsky
Copy link

mdempsky commented May 9, 2014

There are a couple of bare references to "size_t" in the standard, not inside a "namespace std" block, that should probably instead be std::size_t to be consistent with the majority of references (which either use "std::size_t" or are describing functions that are defined within namespace std). E.g.,

  • [lex.ext]p7 has an example for "std::string operator "" _w(const char16_t*, size_t);"; std::string here is fully qualified, so size_t should probably be too.
  • "Table 26 -- Hash requirements [hash]" in [allocator.requirements] mentions "size_t" twice in the "Return type" column (and also "numeric_limits" once in the Requirement column); since allocators aren't necessarily in the 'std' namespace, these references should probably be fully qualified.
  • "Table 115 -- Seed sequence requirements" in [rand.req.seedseq] mentions "size_t" in the "Return type" column; again, seed sequences don't need to be declared in the 'std' namespace, so I think this should be std::size_t.
@jwakely
Copy link
Member

jwakely commented May 9, 2014

I agree with changing the example in [lex.ext] but not the other two, [contents]/3 says:

Whenever a name x defined in the standard library is mentioned, the name x is assumed to be fully qualified as ::std::x, unless explicitly described otherwise.

We should instead be removing redundant qualifiers from the library clauses.

@mdempsky
Copy link
Author

mdempsky commented May 9, 2014

Ah, good point. I retract my comments about Tables 26 and 115.

@zygoloid
Copy link
Member

Fixed by commit 8043471.

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

No branches or pull requests

3 participants