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; 4+ 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] 4+ messages in thread
* [Bug c++/42687] The prevention of ADL with the help of parentheses doesn't work
2010-01-11 9:42 [Bug c++/42687] New: The prevention of ADL with the help of parentheses doesn't work max at e-soft dot ru
@ 2010-01-11 18:38 ` jwakely dot gcc at gmail dot com
0 siblings, 0 replies; 4+ messages in thread
From: jwakely dot gcc at gmail dot com @ 2010-01-11 18:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jwakely dot gcc at gmail dot com 2010-01-11 18:37 -------
This was changed by
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#705 and didn't
appear in the working draft until November.
It's hardly surprising that a compiler released in October doesn't support it
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42687
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/42687] The prevention of ADL with the help of parentheses doesn't work
[not found] <bug-42687-4@http.gcc.gnu.org/bugzilla/>
2011-03-29 13:49 ` f.sowade-gcc at r9e dot de
@ 2011-03-29 14:21 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2011-03-29 14:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42687
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.03.29 13:46:50
Ever Confirmed|0 |1
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-03-29 13:46:50 UTC ---
(In reply to comment #2)
> This is still not fixed in trunk.
Yup, that's why the bug report is still open.
It can be confimed though.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/42687] The prevention of ADL with the help of parentheses doesn't work
[not found] <bug-42687-4@http.gcc.gnu.org/bugzilla/>
@ 2011-03-29 13:49 ` f.sowade-gcc at r9e dot de
2011-03-29 14:21 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 4+ messages in thread
From: f.sowade-gcc at r9e dot de @ 2011-03-29 13:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42687
Florian Sowade <f.sowade-gcc at r9e dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |f.sowade-gcc at r9e dot de
--- Comment #2 from Florian Sowade <f.sowade-gcc at r9e dot de> 2011-03-29 13:27:51 UTC ---
The change in http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#705
only changed the wording to make this behavior clearer.
But the behavior itself is, like clearly argumented there, implied by the old
version of 3.4.2.
This is still not fixed in trunk. Neither in c++0x mode with the explicit
wording in the standard, nor in c++03 mode with the more subtle wording in the
standard.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-29 13:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-11 9:42 [Bug c++/42687] New: The prevention of ADL with the help of parentheses doesn't work max at e-soft dot ru
2010-01-11 18:38 ` [Bug c++/42687] " jwakely dot gcc at gmail dot com
[not found] <bug-42687-4@http.gcc.gnu.org/bugzilla/>
2011-03-29 13:49 ` f.sowade-gcc at r9e dot de
2011-03-29 14:21 ` redi at gcc dot gnu.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).