// More auto/decltype mangling tests. // { dg-options "-std=c++0x" } template struct B { static int i; }; int&& x(); template struct A { static int i; static int &ir; static int &&irr; template auto f(U u) -> decltype (u + i); template auto fr(U u) -> decltype (u + ir); template auto frr(U u) -> decltype (u + irr); template auto g(U u) -> decltype (u + sizeof (i)); template auto h(U u) -> decltype (u + B::i); template auto j(U u) -> decltype (u + x()); }; template template auto A::f(U u) -> decltype (u + i) { return u + i; } template int f (Args... args); template auto g (Args... args) -> decltype (f ((args+1)...)) { return (f ((args+1)...)); } int main() { // { dg-final { scan-assembler "_ZN1AIiE1fIiEEDTplfp_L_ZNS0_1iEEET_" } } A().f(1); // { dg-final { scan-assembler "_ZN1AIiE2frIiEEDTplfp_L_ZNS0_2irEEET_" } } A().fr(1); // { dg-final { scan-assembler "_ZN1AIiE3frrIiEEDTplfp_L_ZNS0_3irrEEET_" } } A().frr(1); // { dg-final { scan-assembler "_ZN1AIiE1gIiEEDTplfp_szL_ZNS0_1iEEET_" } } A().g(1); // { dg-final { scan-assembler "_ZN1AIiE1hIiEEDTplfp_sr1BIT_E1iES3_" } } A().h(1); // { dg-final { scan-assembler "_ZN1AIiE1jIiEEDTplfp_clL_Z1xvEEET_" } } A().j(1); // { dg-final { scan-assembler "_Z1gIIidEEDTcl1fspplfp_Li1EEEDpT_" } } g(42, 1.0); }