The actual result of name resolution in the class template is different from the c++ 03 standard

前端 未结 3 1634
太阳男子
太阳男子 2021-02-13 11:02

I test the code in the c++ standard ISO/IEC 14882-03 14.6.1/9 on Xcode 4.1 and Visual Studio 2008. The outputs of the two compiler are both different from the expected result of

3条回答
  •  無奈伤痛
    2021-02-13 11:41

    What you're running into is the fact that Visual Studio does not implement two-phase lookup. They only look up the actual name when you instantiate the template.

    And Microsoft has pretty much decided at this point that they're not interested in supporting two-phase lookup.

提交回复
热议问题