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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [auto4.C] - Diff between revs 301 and 338

Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 338
// Testcase for deduction of std::initializer_list for auto.
// Testcase for deduction of std::initializer_list for auto.
// { dg-do run }
// { dg-do run }
// { dg-options "-std=c++0x" }
// { dg-options "-std=c++0x" }
#include 
#include 
#include 
#include 
extern "C" void abort();
extern "C" void abort();
template 
template 
void f (T t)
void f (T t)
{
{
  auto ilt = { &t, &t };
  auto ilt = { &t, &t };
  if (typeid(ilt) != typeid(std::initializer_list))
  if (typeid(ilt) != typeid(std::initializer_list))
    abort();
    abort();
  auto il = { 1, 2, 3 };
  auto il = { 1, 2, 3 };
  if (typeid(il) != typeid(std::initializer_list))
  if (typeid(il) != typeid(std::initializer_list))
    abort();
    abort();
}
}
int main()
int main()
{
{
  auto il = { 1, 2, 3 };
  auto il = { 1, 2, 3 };
  if (typeid(il) != typeid(std::initializer_list))
  if (typeid(il) != typeid(std::initializer_list))
    abort();
    abort();
  f('c');
  f('c');
}
}
 
 

powered by: WebSVN 2.1.0

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