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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Incorrect rejection of      |access checking done on
                   |constexpr local var due to  |constexpr even if the
                   |private member even with    |access was done in the
                   |visible conversion operator |class itself when used
                   |                            |inside a template

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Another testcase:
```
struct static_string {
        constexpr operator const char*() const { return &chars_; }
private:
        char chars_{'\0'};
};

constexpr static_string enum_name_v{};

template<int V>
struct s{
        static constexpr const char* local_name = enum_name_v;
};
auto t = s<0>::local_name;
```

Reply via email to