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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [decltype12.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// { dg-do compile }
2
// { dg-options "-std=c++0x" }
3
template
4
struct is_same
5
{
6
  static const bool value = false;
7
};
8
 
9
template
10
struct is_same
11
{
12
  static const bool value = true;
13
};
14
 
15
int&& f(const int&) {}
16
int&& (*fp)(const int&) = f;
17
int&& (&fr)(const int&) = f;
18
 
19
struct X { int&& f(const int&); };
20
 
21
int&& (X::*mfp)(const int&) = &X::f;
22
 
23
void g(X& xr, X* xp)
24
{
25
  int i;
26
  static_assert(is_same::value, "direct call");
27
  static_assert(is_same::value, "pointer");
28
  static_assert(is_same::value,
29
                "dereferenced pointer");
30
  static_assert(is_same::value,
31
                "reference");
32
  static_assert(is_same::value,
33
                "member function call");
34
  static_assert(is_same::value,
35
                "member function pointer with .*");
36
  static_assert(is_same*mfp)(i)), int&&>::value,
37
                "member function pointer with ->*");
38
}

powered by: WebSVN 2.1.0

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