OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [auto4.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Testcase for deduction of std::initializer_list for auto.
2
// { dg-do run }
3
// { dg-options "-std=c++0x" }
4
 
5
#include 
6
#include 
7
extern "C" void abort();
8
 
9
template 
10
void f (T t)
11
{
12
  auto ilt = { &t, &t };
13
  if (typeid(ilt) != typeid(std::initializer_list))
14
    abort();
15
 
16
  auto il = { 1, 2, 3 };
17
  if (typeid(il) != typeid(std::initializer_list))
18
    abort();
19
}
20
 
21
int main()
22
{
23
  auto il = { 1, 2, 3 };
24
  if (typeid(il) != typeid(std::initializer_list))
25
    abort();
26
 
27
  f('c');
28
}

powered by: WebSVN 2.1.0

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