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

            Bug ID: 95982
           Summary: ICE with non-type template parameter that is itself
                    the instantiation of a template
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bence.kodaj at gmail dot com
  Target Milestone: ---

The code below causes an ICE saying "unexpected expression ‘<anonymous>’ of
kind template_parm_index".
OS: Ubuntu 18.04
g++ version: 10.1.0
Wandbox URL: https://wandbox.org/permlink/A9ImqBRe5vyZMFWC#

---------------------------
#include <type_traits>

template< typename, template< auto > typename >
struct IsImplementationOf : std::false_type {};

template< template< auto > typename Template, auto Arg >
struct IsImplementationOf< Template< Arg >, Template > : std::true_type {};

template< typename T >
struct X {
    constexpr X( T ) {}
};

template< X > struct Y {};

int main()
{
    static_assert( IsImplementationOf< Y< X(0) >, Y > );

    return 0;
}
---------------------------

Reply via email to