URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
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" }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.