[Bug c++/93905] Cannot use Derived type of Base containing both enum and protected destructor

karol.koczwara at ig dot com gcc-bugzilla@gcc.gnu.org
Mon Feb 24 16:45:00 GMT 2020


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

--- Comment #2 from Karol Koczwara <karol.koczwara at ig dot com> ---
Updated - not compiling code.

enum class SampleEnumCausingIssue {
    VALUE
};

struct BaseSnapshot {
    SampleEnumCausingIssue enumValue{SampleEnumCausingIssue::VALUE};
protected:
    ~BaseSnapshot() = default;  
};

struct Derived : BaseSnapshot {
};

int main(){
    Derived d{};
}


More information about the Gcc-bugs mailing list