OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [variadic-ex14.C] - Rev 693

Compare with Previous | Blame | View Log

// { dg-options "-std=gnu++0x" }

template<class T> class A { /* ... */ };
template<class T, class U = T> class B { /* ... */ };
template<class... Types> class C { /* ... */ };

template<template<class> class P> class X { /* ... */ };
template<template<class...> class Q> class Y { /* ... */ };

X<A> xA; // okay
X<B> xB; // { dg-error "mismatch" }
// { dg-error "expected a template" "" { target *-*-* } 11 }
// { dg-error "invalid type" "" { target *-*-* } 11 }
X<C> xC; // { dg-error "mismatch" }
// { dg-error "expected a template" "" { target *-*-* } 14 }
// { dg-error "invalid type" "" { target *-*-* } 14 }
Y<A> yA;
Y<B> yB;
Y<C> yC; // okay

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.