Łukasz Kosiak
Łukasz Kosiak

Reputation: 523

C++11 auto variable initialized by nullptr

What is the type of variable "something" in C++ 11 standard initialized by

auto something = nullptr;

?

Upvotes: 6

Views: 4414

Answers (1)

The type of that is std::nullptr_t which is a single valued type introduced in C++11 to represent a null pointer and which is implicitly convertible to any other pointer type.

Upvotes: 12

Related Questions