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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [friend1.C] - Rev 774

Go to most recent revision | Compare with Previous | Blame | View Log

// From N1791
// { dg-options -std=c++0x }

class C;
typedef C Ct;
class X1 {
  friend C;             // OK: class C is a friend
};

class X2
{
  friend Ct;            // OK: class C is a friend
  friend D;             // { dg-error "" } no type-name D in scope
  friend class D;       // OK: elaborated-type-specifier declares new class
};

template <typename T> class R {
  friend T;
};

R<C> rc;                // class C is a friend of R<C>
R<int> Ri;              // OK: "friend int;" is ignored

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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