URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [initlist36.C] - Rev 774
Go to most recent revision | Compare with Previous | Blame | View Log
// PR c++/44358
// { dg-options "-std=c++0x -pedantic-errors" }
#include <initializer_list>
struct A
{
A(int);
};
struct B
{
B(std::initializer_list<A>);
};
void f (B b);
int main()
{
B b0 = {{1}};
B b1 = {{1.0}}; // { dg-error "narrowing" }
B b2 {1.0}; // { dg-error "narrowing" }
A a {1.0}; // { dg-error "narrowing" }
}
Go to most recent revision | Compare with Previous | Blame | View Log