Why is partial specialization of a nested class template allowed, while complete isn't?

后端 未结 4 2064
遇见更好的自我
遇见更好的自我 2020-11-29 03:10
    template struct A {                                                                                                    
        template

        
4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-29 04:09

    My guess as to why this happens: complete specializations are no longer "template classes/functions", they are are "real" classes/methods, and get to have real (linker-visible) symbols. But for a completely-specialized template inside a partially-specialized one, this would not be true. Probably this decision was taken just to simplify the life of compiler-writers (and make life harder for coders, in the process :P ).

提交回复
热议问题