In some code I\'ve inherited, I see frequent use of size_t
with the std
namespace qualifier. For example:
std::size_t n = sizeof(
Section 17.4.1.2 of the C++ standard, paragraph 4, states that:
"In the C++ Standard Library, however, the declarations and definitions (except for names which are defined as macros in C) are within namespace scope (3.3.5) of the namespace std."
This includes items found in headers of the pattern cname, including cstddef, which defines size_t.
So std::size_t is in fact correct.