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