From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25929 invoked by alias); 20 Mar 2008 18:07:15 -0000 Received: (qmail 20853 invoked by uid 48); 20 Mar 2008 18:06:28 -0000 Date: Thu, 20 Mar 2008 18:07:00 -0000 Subject: [Bug c++/35650] New: Can't bind ref-to-function through using-decl. in namespace X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "gcc-bugzilla at contacts dot eelis dot net" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-03/txt/msg01702.txt.bz2 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