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/] [ptrmem7.C] - Rev 832

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

// { dg-do compile }
// Origin: <togawa at acm dot arg>
// c++/2094: unsupported 'ptrmem_cst' in type unification

struct R
{
  int i;
};

struct S
{
  int i;
  int j;
};

struct S2 : S
{};

template<int S::*p, typename>
struct X
{
  X ();
  template<typename U> X(const X<p,U> &);
};

X<&S::i,S> x  = X<&S::i,S>();
X<&S::i,S> x2 = X<&S2::i,S>();
X<&S::i,S> y  = X<&S::j,S>();  // { dg-error "" }
X<&S::i,S> z  = X<&R::i,S>();  // { dg-error "" }

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.