public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42687]  New: The prevention of ADL with the help of parentheses doesn't work
@ 2010-01-11  9:42 max at e-soft dot ru
  2010-01-11 18:38 ` [Bug c++/42687] " jwakely dot gcc at gmail dot com
  0 siblings, 1 reply; 13+ messages in thread
From: max at e-soft dot ru @ 2010-01-11  9:42 UTC (permalink / raw)
  To: gcc-bugs

g++ doesn't accept correct code:

namespace N
{
    struct S { };
    void f(const S &) { }
}

void f(const N::S &) { }

int main()
{
    N::S v;
    (f)(v); // no ambiguity: ADL is prevented with (), only ::f is considered
}

--------------------------------------
References:

    1) http://www.josuttis.com/tmplbook/ - "9.2.1 Argument-Dependent Lookup",
page 123.

    2) http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n3000.pdf -
"3.4.2 Argument-dependent name lookup", example on page 46.


-- 
           Summary: The prevention of ADL with the help of parentheses
                    doesn't work
           Product: gcc
           Version: 4.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: max at e-soft dot ru


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42687


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

end of thread, other threads:[~2011-04-27  5:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-42687-4@http.gcc.gnu.org/bugzilla/>
2011-03-29 13:49 ` [Bug c++/42687] The prevention of ADL with the help of parentheses doesn't work f.sowade-gcc at r9e dot de
2011-03-29 14:21 ` redi at gcc dot gnu.org
2011-03-29 14:22 ` [Bug c++/42687] [4.4/4.5/4.6/4.7 Regression] " redi at gcc dot gnu.org
2011-04-06  0:26 ` pinskia at gcc dot gnu.org
2011-04-10 10:30 ` rguenth at gcc dot gnu.org
2011-04-16 10:39 ` jakub at gcc dot gnu.org
2011-04-27  0:12 ` jason at gcc dot gnu.org
2011-04-27  5:21 ` jason at gcc dot gnu.org
2011-04-27  5:23 ` jason at gcc dot gnu.org
2011-04-27  5:27 ` jason at gcc dot gnu.org
2011-04-27  5:35 ` jason at gcc dot gnu.org
2011-04-27  5:36 ` jason at gcc dot gnu.org
2010-01-11  9:42 [Bug c++/42687] New: " max at e-soft dot ru
2010-01-11 18:38 ` [Bug c++/42687] " jwakely dot gcc at gmail dot com

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).