This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/80417] New: GCC does not accept a well-formed code of using declaration with pack expansion results inheriting constructor


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

            Bug ID: 80417
           Summary: GCC does not accept a well-formed code of using
                    declaration with pack expansion results inheriting
                    constructor
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: boostcpp at gmail dot com
  Target Milestone: ---

GCC does not accept a well-formed code of using declaration with pack expansion
results inheriting constructor.

Following code shall be well-formed but GCC reject it.

struct A
{
    A( int ) { } 
} ;

template < typename ... Types >
struct B : Types ...
{
    // Inheriting Constructor
    // GCC reject it
    /// Clang accept it
    using Types::Types... ;
} ;

int main()
{
    B<A> obj(0) ; 
}

Although I have no practical application for this code, I see no wording in the
standard prohibit this so this shall be well-formed.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]