Does auto deduce the type at compile time or runtime in C++ 11?

Compile time. In C++, runtime type information is stripped during compilation(without RTTI or virtual inheritance). It is not possible, in fact, to inspect the primitive type at runtime.

Leave a Comment