This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <int ...N> // expected-error{{deduced non-type template argument does not have the same type as the corresponding template parameter ('int' vs 'long')}}
classTT// expected-note {{previous template template parameter is here}}
> structX0 { };
template<template <int ...N> classTT> structX0 { }; // expected-note{{previous non-type template parameter with type 'int' is here}}
template<int I, int J, int ...Rest> structX0a;
template<int ...Rest> structX0b;
template<int I, long J> structX0c; // expected-note{{template parameter is declared here}}
template<int I, long J> structX0c; // expected-note{{template non-type parameter has a different type 'long' in template argument}}
X0<X0a> inst_x0a;
X0<X0b> inst_x0b;
X0<X0c> inst_x0c; // expected-note{{template template argument has different template parameters than its corresponding template template parameter}}
X0<X0c> inst_x0c; // expected-error{{template template argument has different template parameters than its corresponding template template parameter}}
template<typename T,
template <T ...N> // expected-error{{deduced non-type template argument does not have the same type as the corresponding template parameter ('short' vs 'long')}}
classTT// expected-note {{previous template template parameter is here}}
> structX1 { };
template<typename T,
template <T ...N> classTT> // expected-note{{previous non-type template parameter with type 'short' is here}}
structX1 { };
template<int I, int J, int ...Rest> structX1a;
template<long I, long ...Rest> structX1b;
template<short I, short J> structX1c;
template<short I, long J> structX1d; // expected-note{{template parameter is declared here}}
template<short I, long J> structX1d; // expected-note{{template non-type parameter has a different type 'long' in template argument}}
X1<int, X1a> inst_x1a;
X1<long, X1b> inst_x1b;
X1<short, X1c> inst_x1c;
X1<short, X1d> inst_x1d; // expected-note{{template template argument has different template parameters than its corresponding template template parameter}}
X1<short, X1d> inst_x1d; // expected-error{{template template argument has different template parameters than its corresponding template template paramete}}
template <int> classX2; // expected-note{{template is declared here}} \
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<template<typename T, int I> classX> structB; // expected-note{{previous template template parameter is here}}
template<template<int I> classX> structC;
// precxx17-error@-1 {{deduced non-type template argument does not have the same type as the corresponding template parameter ('int' vs 'const int &')}}
// cxx17-error@-2 {{conversion from 'int' to 'const int &' in converted constant expression would bind reference to a temporary}}
// expected-note@-3 {{previous template template parameter is here}}
template<template<int I> classX> structC; // expected-note {{previous non-type template parameter with type 'int' is here}}
template<class> structX; // expected-note {{template is declared here}}
template<int N> structY; // expected-note{{template parameter is declared here}}
template<class> structX; // expected-note{{too few template parameters in template template argument}}
template<int N> structY; // expected-note{{template parameter has a different kind in template argument}}
template<long N> structYlong;
template<constint &N> structYref; //precxx17-note{{template parameter is declared here}}
template<constint &N> structYref; //expected-note{{template non-type parameter has a different type 'const int &' in template argument}}
namespaceN {
template<class> structZ;
}
template<class, class> structTooMany; // expected-note{{template is declared here}}
template<class, class> structTooMany; // expected-note{{too many template parameters in template template argument}}
A<X> *a1;
A<N::Z> *a2;
A< ::N::Z> *a3;
A<Y> *a4; // expected-error@#A {{template argument for non-type template parameter must be an expression}}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters