[Bug c++/35650] New: Can't bind ref-to-function through using-decl. in namespace
gcc-bugzilla at contacts dot eelis dot net
gcc-bugzilla@gcc.gnu.org
Thu Mar 20 18:07:00 GMT 2008
Consider:
void f();
namespace N { using ::f; }
void h()
{
void (& a)() = f; // ok
void (& b)() = N::f;
// error: invalid initialization of non-const reference of
// type âÂÂvoid (&)()â from a temporary of type âÂÂvoid ()()âÂÂ
}
Since in h, f and N::f are simply two ways of naming the same function, the
error seems unwarranted to me.
Comeau 4.3.9 accepts the code.
--
Summary: Can't bind ref-to-function through using-decl. in
namespace
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc-bugzilla at contacts dot eelis dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35650
More information about the Gcc-bugs
mailing list