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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [template/] [access11.C] - Rev 149

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

// Copyright (C) 2003 Free Software Foundation
// Contributed by Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
// { dg-do compile }

// Access checking during explicit instantiation.

class A {
  typedef int X;                // { dg-error "private" }
};

class X {
  private:
  template <typename T> struct Y;
};

template <> struct X::Y<int> {
  A::X x;                       // { dg-error "this context" }
};

template <typename T> struct X::Y {
  typename T::X x;              // { dg-error "this context" }
};

template struct X::Y<A>;        // { dg-error "instantiated" }

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.