public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54769] New: C++ parser - dependent class method template not found if structure template with the same name is visible
@ 2012-10-01 19:00 awulkiew at gmail dot com
2012-10-02 6:05 ` [Bug c++/54769] " daniel.kruegler at googlemail dot com
2012-10-02 9:58 ` [Bug c++/54769] [Core/1111] " paolo.carlini at oracle dot com
0 siblings, 2 replies; 3+ messages in thread
From: awulkiew at gmail dot com @ 2012-10-01 19:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54769
Bug #: 54769
Summary: C++ parser - dependent class method template not found
if structure template with the same name is visible
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: awulkiew@gmail.com
Created attachment 28316
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28316
src, temps, error
If the object is of dependent type, the parser finds incorrect name. E.g. the
following code won't compile:
template <typename T1, typename T2>
struct boom {};
struct aaa
{
template <typename T>
void boom() {}
};
template <typename T>
struct bbb
{
void test()
{
T t;
t.template boom<int>();
}
};
int main()
{
bbb<aaa> b;
b.test();
return 0;
}
Error:
main.cpp: In member function 'void bbb<T>::test()':
main.cpp:16:28: error: wrong number of template arguments (1, should be 2)
main.cpp:2:8: error: provided for 'template<class T1, class T2> struct boom'
Environment: windows 7 x64 + GCC 4.7.0
Cmd: gcc main.cpp
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/54769] C++ parser - dependent class method template not found if structure template with the same name is visible
2012-10-01 19:00 [Bug c++/54769] New: C++ parser - dependent class method template not found if structure template with the same name is visible awulkiew at gmail dot com
@ 2012-10-02 6:05 ` daniel.kruegler at googlemail dot com
2012-10-02 9:58 ` [Bug c++/54769] [Core/1111] " paolo.carlini at oracle dot com
1 sibling, 0 replies; 3+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2012-10-02 6:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54769
--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2012-10-02 06:04:56 UTC ---
In C++03 this was supposed to be ill-formed, but - as Mike Miller explained to
me - with the acceptance of CWG 1111 (no kidding ;-))
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1111
this code should now become accepted.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/54769] [Core/1111] dependent class method template not found if structure template with the same name is visible
2012-10-01 19:00 [Bug c++/54769] New: C++ parser - dependent class method template not found if structure template with the same name is visible awulkiew at gmail dot com
2012-10-02 6:05 ` [Bug c++/54769] " daniel.kruegler at googlemail dot com
@ 2012-10-02 9:58 ` paolo.carlini at oracle dot com
1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-02 9:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54769
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-10-02
Summary|C++ parser - dependent |[Core/1111] dependent class
|class method template not |method template not found
|found if structure template |if structure template with
|with the same name is |the same name is visible
|visible |
Ever Confirmed|0 |1
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-02 09:57:55 UTC ---
Ok, let's update the Summary then.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-02 9:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-01 19:00 [Bug c++/54769] New: C++ parser - dependent class method template not found if structure template with the same name is visible awulkiew at gmail dot com
2012-10-02 6:05 ` [Bug c++/54769] " daniel.kruegler at googlemail dot com
2012-10-02 9:58 ` [Bug c++/54769] [Core/1111] " paolo.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).