Is there a way to test whether a C++ class has a default constructor (other than compiler-provided type traits)?

后端 未结 7 2131
花落未央
花落未央 2020-11-28 13:00

Traits classes can be defined to check if a C++ class has a member variable, function or a type (see here).

Curiously, the ConceptTraits do not include traits to che

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-28 13:20

    MSDN says that the header defines has_default_constructor and such traits.

    http://msdn.microsoft.com/en-us/library/bb982179.aspx

提交回复
热议问题