jeudi 24 mai 2018

How am I able to use int32_t without without using std?

Here is my code:

#include <iostream>

int main()
{
    int32_t i = 5;
    std::cout << "i: " << i << '\n';
}

Here is the output:

$ clang++ -std=c++11 -pedantic -Wall -Wextra foo.cpp && ./a.out 
i: 5

Here is my question:

The C++ standard appears to define int32_t in cstdint within the std namespace.

In my code, I have neither included cstdint nor do I use the std namespace. Why does the compiler not complain then?

Aucun commentaire:

Enregistrer un commentaire