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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [diag1.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-options -std=c++0x }
2
 
3
template 
4
struct TypeA
5
{
6
  typedef int type;
7
};
8
 
9
template 
10
struct TypeB
11
{
12
  template  typename TypeA::type fn();
13
};
14
 
15
struct TypeC
16
{
17
  TypeB<10> b;
18
  // This was being printed as:
19
  // template
20
  //   decltype (((TypeC*)this)->
21
  //             TypeC::b.
22
  //             template typename TypeA::type TypeB::fn [with int U = U, int N = 10, typename TypeA::type = TypeA::type]())
23
  //   TypeC::fn()
24
  // we don't want to see the template header, return type, or parameter bindings
25
  // for TypeB::fn.
26
  template  auto fn() -> decltype(b.fn()); // { dg-bogus "typename|with" }
27
};
28
 
29
int main()
30
{
31
  TypeC().fn<4>(1);                // { dg-error "no match" }
32
}

powered by: WebSVN 2.1.0

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