Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp1z/using1.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// Test for hiding of used base functions when all the conversion sequences are // equivalent, needed to avoid a regression on inherited default ctors. struct A { void f(short,int=0); void g(char,int=0); }; struct B:A { using A::f; void f(short); using A::g; void g(short); }; int main() { B().f(1); // OK, derived f hides base f for single arg B().f(1,2); // OK, base f can still be called with two args B().g(1); // { dg-error "" } signatures differ, ambiguous }