[Bug c++/41437] No access control for classes in template functions

barry.revzin at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Mar 14 01:24:00 GMT 2016


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

Barry Revzin <barry.revzin at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |barry.revzin at gmail dot com

--- Comment #7 from Barry Revzin <barry.revzin at gmail dot com> ---
This bug still exists in 5.3.0. For instance:

class X {
    int mem;
};

template <class T>
auto foo(T) {
    return &X::mem;
}

int main() {
    foo(0);
}


More information about the Gcc-bugs mailing list