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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/41927
2
// { dg-options "-std=c++0x -Wall" }
3
 
4
// We were getting a spurious ||/&& warning about the enable_if with the
5
// source position of d1.
6
 
7
template
8
  struct is_int
9
  { static const bool value = true; };
10
 
11
template
12
  struct enable_if
13
  { };
14
 
15
template
16
  struct enable_if
17
  { typedef Tp type; };
18
 
19
template
20
  struct duration
21
  {
22
    duration() { }
23
 
24
    template
25
             enable_if::value)>::type>
26
    duration(const duration&) { }
27
  };
28
 
29
int main()
30
{
31
  duration d0;
32
  duration d1 = d0;     // { dg-warning "set but not used" }
33
}
34
 

powered by: WebSVN 2.1.0

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