Bug 28793 - Error while deducting template arg
Summary: Error while deducting template arg
Status: RESOLVED DUPLICATE of bug 11407
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.0.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2006-08-21 17:08 UTC by Suzev Kirill
Modified: 2006-10-09 17:57 UTC (History)
13 users (show)

See Also:
Known to work:
Known to fail: 2.95.3 3.0.4 4.0.0 4.1.0 4.2.0 3.3.3 3.2.3
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Suzev Kirill 2006-08-21 17:08:00 UTC
Compiler: gcc 4.0.2 (bug can exist in higher versions)
OS: Red Hat Linux Adv. Server

Code, that generate error:


#include <iostream>

template <typename F>
void MainFunction (F f)

template <typename Type>
void TestFunc (Type & t)

template <typename T1, typename T2>
void TestFunc (T1 & t1, T2 & t2)

int main ()
	return 1;

gcc output:

**** Incremental build of configuration Debug for project test ****

make -k all 
Building file: ../main.cpp
Invoking: GCC C++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -omain.o ../main.cpp
../main.cpp: In function ‘int main()’:
../main.cpp:21: error: no matching function for call to ‘MainFunction(<unknown type>)’
make: *** [main.o] Error 1
make: Target `all' not remade because of errors.
Build complete for project test

Error is that giving code is correct. Comeau and VS 7.1 compile it without any problem.
Comment 1 Andrew Pinski 2006-08-21 17:13:05 UTC

*** This bug has been marked as a duplicate of 5458 ***
Comment 2 Andrew Pinski 2006-10-09 17:57:19 UTC
Reopening for a second to ...
Comment 3 Andrew Pinski 2006-10-09 17:57:57 UTC
Mark as a dup of bug 11407.

*** This bug has been marked as a duplicate of 11407 ***