[Bug c++/28895] New: friend accepts template type-parameter.
pluto at agmk dot net
gcc-bugzilla@gcc.gnu.org
Tue Aug 29 22:52:00 GMT 2006
template <typename T>
class final
{
  struct workaround { typedef T type; };
  friend class workaround::type;
  final() { };
  final( final const& ) { };
};
struct Foo : virtual public final<Foo> {};
void test() {Â Foo foo; }
$7.1.5.3/2 prohibits such code and Comeau compiler reports an error:
error: typedef "type" may not be used in an
elaborated type specifier
   friend class workaround::type;
               ^
--
Summary: friend accepts template type-parameter.
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28895
More information about the Gcc-bugs
mailing list