简体   繁体   中英

C++11 auto variable initialized by nullptr

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

auto something = nullptr;

?

它的类型是std::nullptr_t ,它是在C ++ 11中引入的单值类型,用于表示空指针,并且可以隐式转换为任何其他指针类型。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM