Where Can I View The std:: Namespace?

Where can I see everything which lives inside the std:: namespace in C++?

https://en.cppreference.com/mwiki/index.php?title=Special%3ASearch&search=std
The main page should have links to everything you would need:
https://en.cppreference.com/w/
Thanks, I can't see the anything there which shows me all of the available things in the std:: namespace? That's just a page of the whole C++ language. I'm trying to ascertain what lives in the std:: namespace.

Pretty much anything that isn't the core language is in the std namespace.
Basically everything defined in header files is in std (except that some stuff, such as the C library, is commonly dumped into the global namespace).
Maybe see a list of all header files:
https://en.cppreference.com/w/cpp/header
That's just a page of the whole C++ language.

That is what resides in the std namespace. ALL of the C++ Standard Library as defined by the C++ headers.
https://en.cppreference.com/w/cpp/header

That includes the C library <xxx.h> headers C++ "ported" over in <cxxx> headers.

The <cxxx> C++ headers are allowed to declare names in the std and global namespaces. <cstdlib> for instance can provide both std::rand and rand. The C++ implementations I regularly use do this.

I have yet to find a <cxxx> name that is not included in the global namespace as well as the std namespace.
OP,

anything that is a part of the standard library is a part of the std namespace (with some exceptions, like dutch mentioned with certain C library functions). This includes std::vector and std::array, etc.

The fundamental types (int, bool, char) along with keywords are all implemented in the language ITSELF, not through standard library headers. Thus, you don't need to prefix them with std::
Last edited on
Where can I see everything which lives inside the std:: namespace in C++?

The standard draft's index of library names doesn't discriminate between names in the global namespace, names in std, and macro names:
http://eel.is/c++draft/libraryindex

An up-to-date implementation's API documentation might be a better fit:
https://gcc.gnu.org/onlinedocs/gcc-10.1.0/libstdc++/api/a01549.html
Last edited on
Registered users can post here. Sign in or register to post.