public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35650]  New: Can't bind ref-to-function through using-decl. in namespace
@ 2008-03-20 18:07 gcc-bugzilla at contacts dot eelis dot net
  2008-03-20 19:56 ` [Bug c++/35650] [4.1/4.2/4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: gcc-bugzilla at contacts dot eelis dot net @ 2008-03-20 18:07 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 846 bytes --]

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-04-29  9:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-20 18:07 [Bug c++/35650] New: Can't bind ref-to-function through using-decl. in namespace gcc-bugzilla at contacts dot eelis dot net
2008-03-20 19:56 ` [Bug c++/35650] [4.1/4.2/4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
2008-03-25 19:03 ` bangerth at dealii dot org
2008-03-31  9:42 ` rguenth at gcc dot gnu dot org
2008-04-22  7:38 ` jakub at gcc dot gnu dot org
2008-04-29  8:59 ` jakub at gcc dot gnu dot org
2008-04-29  9:00 ` jakub at gcc dot gnu dot org
2008-04-29  9:07 ` jakub at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).