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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [initlist42.C] - Rev 774

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

// { dg-options -std=c++0x }

enum Unscoped { };
enum class Scoped { };

Unscoped bar(Unscoped x) { return x; }
Scoped bar(Scoped x) { return x; }

auto var1u = bar(Unscoped()); // OK
auto var1s = bar(Scoped()); // OK

auto var2u = bar(Unscoped{}); // #1 Error, but should work
auto var2s = bar(Scoped{}); // #2 Error, but should work

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

powered by: WebSVN 2.1.0

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