Scope resolution operator

后端 未结 2 874
眼角桃花
眼角桃花 2020-12-30 20:05

I accidentally happened to find this in one of the source codes I was looking at. So, I\'m giving a similar smaller example here.

In the file test.h:

<
2条回答
  •  死守一世寂寞
    2020-12-30 20:49

    This code is not valid.

    It was a bug in g++ that it accepted the code. See "g++ does not treat injected class name correctly." The bug was resolved as fixed in 2009, so it should be fixed in any recent version of g++.

提交回复
热议问题