Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp0x/initlist92.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | 1830386684a0 |
children |
line wrap: on
line source
// PR c++/64665, DR 1467 // { dg-do compile { target c++11 } } #include <string> bool Test1(bool); bool Test1(std::string) = delete; bool Test2(int) = delete; bool Test2(std::initializer_list<int>); struct S { S(int _a) : a(_a) {} private: int a; }; bool Test3(int); bool Test3(S) = delete; bool Test4(bool) = delete; bool Test4(std::initializer_list<std::string>); int main () { ( Test1({"false"}) ); // { dg-error "narrowing" "" { target c++2a } } ( Test2({123}) ); ( Test3({456}) ); ( Test4({"false"}) ); }