[Bug c++/69470] New: [concepts] bogus constrained member class template redeclared with different access

lucdanton at free dot fr gcc-bugzilla@gcc.gnu.org
Mon Jan 25 17:00:00 GMT 2016


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

            Bug ID: 69470
           Summary: [concepts] bogus constrained member class template
                    redeclared with different access
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lucdanton at free dot fr
  Target Milestone: ---

Using 6.0.0 20160122, testcase compiled with:
    g++-trunk -std=c++1z main.cpp

results in:

main.cpp:13:5: error: 'struct foo<0, T>' redeclared with different access

Full testcase:

struct enclosing {
private:
    template<int N, typename T>
    struct foo {};

    template<typename T>
        requires false
    struct foo<0, T> {};

    template<typename T>
        requires true
    // error: 'struct foo<0, T>' redeclared with different access
    struct foo<0, T> {};
};

int main()
{
}


More information about the Gcc-bugs mailing list