https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83730

Wilhelm M <klaus.doldinger64 at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|wrong-code                  |

--- Comment #4 from Wilhelm M <klaus.doldinger64 at googlemail dot com> ---
If you change the example as below, you still get guards.

struct A {
    A() = default;
    void foo() {}
};

template<typename T>
struct B {
    static void foo() {
        mTop.foo();
    }
    static T mTop;
};

template<typename T> T B<T>::mTop; // change

int main() {
    B<A>::foo();
}

Reply via email to