OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.oliva/] [template10.C] - Diff between revs 305 and 338

Only display areas with differences | Details | Blame | View Log

Rev 305 Rev 338
// { dg-do assemble  }
// { dg-do assemble  }
// Copyright (C) 1999 Free Software Foundation
// Copyright (C) 1999 Free Software Foundation
// by Alexandre Oliva 
// by Alexandre Oliva 
// bug report by Martin Sebor 
// bug report by Martin Sebor 
// based on C++ Standard example in [temp.expl.spec]/5
// based on C++ Standard example in [temp.expl.spec]/5
/* Members of explicitly specialized template classes shall not be
/* Members of explicitly specialized template classes shall not be
   defined with template-specialization syntax.  The example in the
   defined with template-specialization syntax.  The example in the
   Standard contains a definition of a member function of the
   Standard contains a definition of a member function of the
   explicitly specialized class template, but the paragraph refers to
   explicitly specialized class template, but the paragraph refers to
   members in general, not only member functions.  */
   members in general, not only member functions.  */
template struct A {};
template struct A {};
template<> struct A {
template<> struct A {
  static bool a, b;
  static bool a, b;
};
};
bool A::a = true; // ok
bool A::a = true; // ok
template<> bool A::b = false; // { dg-error "template header" }
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.