blob: 3c98105fced1445585804c5c44a6dc1200a8b304 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// 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;
}
|