Why is my class non default-constructible?

后端 未结 2 643
情书的邮戳
情书的邮戳 2020-12-15 03:55

I have those classes:

#include 

template 
class A {
public:
    static_assert(std::is_default_constructible_v)         


        
2条回答
  •  南方客
    南方客 (楼主)
    2020-12-15 04:13

    Undefined behavior it is:

    If an instantiation of a template above depends, directly or indirectly, on an incomplete type, and that instantiation could yield a different result if that type were hypothetically completed, the behavior is undefined.

提交回复
热议问题