public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/38242] New: Overeager ADL searches associated namespaces of base class's template arguments
@ 2008-11-23 22:42 eric dot niebler at gmail dot com
2008-11-24 10:08 ` [Bug c++/38242] " rguenth at gcc dot gnu dot org
2009-12-26 19:20 ` paolo dot carlini at oracle dot com
0 siblings, 2 replies; 3+ messages in thread
From: eric dot niebler at gmail dot com @ 2008-11-23 22:42 UTC (permalink / raw)
To: gcc-bugs
The following code compiles. It shouldn't. The operator+ should not be found.
According to 3.4.2/2, the associated namespace of a type includes those of its
bases and of its template arguments, but not its bases' template arguments.
namespace N
{
struct S {};
template<class T, class U>
void operator+(T const &, U const &) {}
}
template<class T> struct X {};
struct Y : X<N::S> {};
int main()
{
Y y;
y+y; // this should fail.
}
--
Summary: Overeager ADL searches associated namespaces of base
class's template arguments
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eric dot niebler at gmail dot com
GCC build triplet: g++ 4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38242
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/38242] Overeager ADL searches associated namespaces of base class's template arguments
2008-11-23 22:42 [Bug c++/38242] New: Overeager ADL searches associated namespaces of base class's template arguments eric dot niebler at gmail dot com
@ 2008-11-24 10:08 ` rguenth at gcc dot gnu dot org
2009-12-26 19:20 ` paolo dot carlini at oracle dot com
1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-11-24 10:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2008-11-24 10:07 -------
Y is also not a template-id (?)
Confirmed. EDG rejects this.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |accepts-invalid
Known to fail| |2.95.4 4.4.0
Last reconfirmed|0000-00-00 00:00:00 |2008-11-24 10:07:12
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38242
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/38242] Overeager ADL searches associated namespaces of base class's template arguments
2008-11-23 22:42 [Bug c++/38242] New: Overeager ADL searches associated namespaces of base class's template arguments eric dot niebler at gmail dot com
2008-11-24 10:08 ` [Bug c++/38242] " rguenth at gcc dot gnu dot org
@ 2009-12-26 19:20 ` paolo dot carlini at oracle dot com
1 sibling, 0 replies; 3+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-26 19:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from paolo dot carlini at oracle dot com 2009-12-26 19:19 -------
Fix (by Jason, I think) in mainline, not a regression, closing.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Known to work| |4.5.0
Resolution| |FIXED
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38242
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-12-26 19:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-23 22:42 [Bug c++/38242] New: Overeager ADL searches associated namespaces of base class's template arguments eric dot niebler at gmail dot com
2008-11-24 10:08 ` [Bug c++/38242] " rguenth at gcc dot gnu dot org
2009-12-26 19:20 ` paolo dot carlini at oracle 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).