Why is S::x not odr-used?

前端 未结 3 1291
难免孤独
难免孤独 2020-12-23 19:34

Consider this example from cppreference:

struct S { static const int x = 1; };
void f() { &S::x; } // discarded-value expression does not odr-use S::x
         


        
3条回答
提交回复
热议问题