This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Bad C++ using-declaration semantics
- To: gcc-bugs at gcc dot bug dot org, ncm at cantrip dot org
- Subject: Re: Bad C++ using-declaration semantics
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Fri, 19 May 2000 08:54:59 +0200
- CC: gcc-bugs at gcc dot gnu dot org
- References: <20000518202851.A19319@store.zembu.com>
> -------------
> namespace A { struct S {}; void f(S); }
> using A::f;
> namespace A { void f(double); }
>
> int main()
> {
> f(0.5);
> };
> -------------
>
> I get:
>
> abs.cc: In function `int main ()':
> abs.cc:10: conversion from `double' to non-scalar type `A::S' requested
>
> I believe that the "f" lookup should find both definitions of f,
> and apply overloading to disambiguate them.
Thanks for your bug report. This is not a bug in the compiler, but in
your code, see 7.3.3/9.
Regards,
Martin