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/] [initlist-deduce.C] - Diff between revs 301 and 338

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

Rev 301 Rev 338
// Test for deduction of T as std::initializer_list.  This isn't currently
// Test for deduction of T as std::initializer_list.  This isn't currently
// supported by the working draft, but is necessary for perfect forwarding
// supported by the working draft, but is necessary for perfect forwarding
// of initializer-lists to things that can take a std::initializer_list.
// of initializer-lists to things that can take a std::initializer_list.
// { dg-options -std=c++0x }
// { dg-options -std=c++0x }
// { dg-do run }
// { dg-do run }
#include 
#include 
struct A
struct A
{
{
  A(std::initializer_list) { }
  A(std::initializer_list) { }
};
};
void f (A a) { }
void f (A a) { }
template 
template 
auto g (T&& t) -> decltype (f(t)) // { dg-warning "call" }
auto g (T&& t) -> decltype (f(t)) // { dg-warning "call" }
{
{
  return f(t);
  return f(t);
}
}
int main()
int main()
{
{
  g({1});                       // { dg-warning "deduc" }
  g({1});                       // { dg-warning "deduc" }
}
}
 
 

powered by: WebSVN 2.1.0

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