Clang template incomplete type

后端 未结 1 1228
醉话见心
醉话见心 2020-12-18 12:20

I have the following code that compiles fine under in Visual Studio and g++ but in Clang I get the error \"error: \'ns::B\' is an incomplete type\"

A.h



        
相关标签:
1条回答
  • 2020-12-18 13:09

    The program is ill-formed, no diagnostic required.

    [temp.res]/8:

    The program is ill-formed, no diagnostic required, if:

    • [...]
    • a hypothetical instantiation of a template immediately following its definition would be ill-formed due to a construct that does not depend on a template parameter, or
    • [...]
    0 讨论(0)
提交回复
热议问题