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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.oliva/] [template10.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// { dg-do assemble  }
2
 
3
// Copyright (C) 1999 Free Software Foundation
4
 
5
// by Alexandre Oliva 
6
// bug report by Martin Sebor 
7
// based on C++ Standard example in [temp.expl.spec]/5
8
 
9
/* Members of explicitly specialized template classes shall not be
10
   defined with template-specialization syntax.  The example in the
11
   Standard contains a definition of a member function of the
12
   explicitly specialized class template, but the paragraph refers to
13
   members in general, not only member functions.  */
14
 
15
template struct A {};
16
 
17
template<> struct A {
18
  static bool a, b;
19
};
20
 
21
bool A::a = true; // ok
22
template<> bool A::b = false; // { dg-error "template header" }

powered by: WebSVN 2.1.0

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