URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [decltype17.C] - Rev 301
Compare with Previous | Blame | View Log
// PR c++/36628
// { dg-options "-std=c++0x" }
// { dg-do run }
#include <typeinfo>
#include <string.h>
int rvalue();
int& lvalueref();
int&& rvalueref();
decltype(true ? rvalue() : rvalue()) f()
{}
decltype(true ? lvalueref() : lvalueref()) g()
{}
decltype(true ? rvalueref() : rvalueref()) h()
{}
int main()
{
if (strcmp (typeid(f).name(), "FivE") != 0)
return 1;
if (strcmp (typeid(g).name(), "FRivE") != 0)
return 2;
if (strcmp (typeid(h).name(), "FivE") != 0)
return 3;
}