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] - Diff between revs 301 and 338

Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 338
// { dg-do compile }
// { dg-do compile }
// { dg-options "-std=c++0x" }
// { dg-options "-std=c++0x" }
template
template
struct is_same
struct is_same
{
{
  static const bool value = false;
  static const bool value = false;
};
};
template
template
struct is_same
struct is_same
{
{
  static const bool value = true;
  static const bool value = true;
};
};
int&& f(const int&) {}
int&& f(const int&) {}
int&& (*fp)(const int&) = f;
int&& (*fp)(const int&) = f;
int&& (&fr)(const int&) = f;
int&& (&fr)(const int&) = f;
struct X { int&& f(const int&); };
struct X { int&& f(const int&); };
int&& (X::*mfp)(const int&) = &X::f;
int&& (X::*mfp)(const int&) = &X::f;
void g(X& xr, X* xp)
void g(X& xr, X* xp)
{
{
  int i;
  int i;
  static_assert(is_same::value, "direct call");
  static_assert(is_same::value, "direct call");
  static_assert(is_same::value, "pointer");
  static_assert(is_same::value, "pointer");
  static_assert(is_same::value,
  static_assert(is_same::value,
                "dereferenced pointer");
                "dereferenced pointer");
  static_assert(is_same::value,
  static_assert(is_same::value,
                "reference");
                "reference");
  static_assert(is_same::value,
  static_assert(is_same::value,
                "member function call");
                "member function call");
  static_assert(is_same::value,
  static_assert(is_same::value,
                "member function pointer with .*");
                "member function pointer with .*");
  static_assert(is_same*mfp)(i)), int&&>::value,
  static_assert(is_same*mfp)(i)), int&&>::value,
                "member function pointer with ->*");
                "member function pointer with ->*");
}
}
 
 

powered by: WebSVN 2.1.0

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