aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-temp1.C
blob: d06543632703708d3ef5d863e1e48cb432b3da09 (plain)
1
2
3
4
5
6
7
8
9
// { dg-do compile { target c++11 } }

struct A { int i; };
constexpr A f2 (const A& a) { return a; }
constexpr int f1 (const A &a) { return f2(a).i; }
A g(const A &a)
{
  return { f1(a) };
}