p13.cpp 572 B

123456789101112131415
  1. // RUN: %clang_cc1 -fsyntax-only -verify %s
  2. // expected-no-diagnostics
  3. // The scope of atemplate-parameterextends from its point of
  4. // declaration until the end of its template. In particular, a
  5. // template-parameter can be used in the declaration of subsequent
  6. // template-parameters and their default arguments.
  7. template<class T, T* p, class U = T> class X { /* ... */ };
  8. // FIXME: template<class T> void f(T* p = new T);
  9. // Check for bogus template parameter shadow warning.
  10. template<template<class T> class,
  11. template<class T> class>
  12. class B1noshadow;