[Bug c++/100918] Naming a destructor as a qualified template-id results in bogus access error

ppalka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jun 4 20:27:01 GMT 2021


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

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
We began rejecting this starting with r9-4879.


If we replace the explicit specialization of Inner<int>::~Inner with a generic
definition

struct Outer {
public:
    template <typename T>
    struct Inner { ~Inner(); };
};

template <class T>
Outer::Inner<T>::~Inner<T>() {}

Outer::Inner<int> x;

then we started to reject this version after r11-1350.


More information about the Gcc-bugs mailing list