Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何编写像“is_private_constructor”这样的类型特征函数来特征类的默认构造函数是私有的(一个类可以实例化)?
对于 C++11,只是拼写不同:std::is_default_constructible<Ty>在 header 中定义<type_traits>。
std::is_default_constructible<Ty>
<type_traits>