Bug 2867 - Koenig lookup bug
Summary: Koenig lookup bug
Status: CLOSED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.0
: P3 normal
Target Milestone: ---
Assignee: Gabriel Dos Reis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-05-18 06:16 UTC by kunert
Modified: 2005-07-23 22:46 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kunert 2001-05-18 06:16:01 UTC
This code:

	namespace N {
	    class A{};
	    template<class T>
	    void f( A ){};
	}

 	int main()
	{
	    N::A a;
	    f<int>(a);
	}

results in the error:

x1.cc: In function `int main()':
x1.cc:10: `f' undeclared (first use this function)
x1.cc:10: parse error before `>' token

Release:
gcc version 3.0 20010517

Environment:
Configured with: ../gcc/configure i686-pc-linux-gnu --enable-shared --prefix=/opt --enable-languages=c,c++,f77
Thread model: single
Comment 1 Gabriel Dos Reis 2001-08-11 12:35:03 UTC
Responsible-Changed-From-To: unassigned->gdr
Responsible-Changed-Why: Analyzed.
Comment 2 Gabriel Dos Reis 2001-08-11 12:35:03 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed as bug.
Comment 3 Gabriel Dos Reis 2002-05-20 19:14:03 UTC
State-Changed-From-To: analyzed->closed
State-Changed-Why: further investigation reveals that it is not a bug.  See
    note 14.8/6: a template-id used to call a function disables
    Koenig lookup since it does not have the correct function
    call syntax.