[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
2.8.1 template bug
From: |
Philippe COVAL |
Subject: |
2.8.1 template bug |
Date: |
Fri, 15 Feb 2002 07:00:50 -0800 (PST) |
/#ident "$Id:$"
/**
* Gcc 2 8 1 bug seems to be corrected on G++ 3
* @author Philippe.COVAL(a)Yahoo.COM - http://RzR.online.FR
**/
#include <iostream>
using namespace std;
//--------------------------------------------------------------------------
template <class T>
class TestClass
{
public:
static void f(T arg) ;
};
template<class T>
void TestClass<T>::f(T arg) { cout<<"="<<arg<<endl; }
// can not declare overloaded function
//template<>
//void TestClass<char>::f(char arg);
// U f__t5Templ1Zcc
//00000804 W f__t5Templ1Zii
//--------------------------------------------------------------------------
template<>
void TestClass<char>::f(char arg) { cout<<"+"<<arg<<endl; }
//000007e4 T f__t5Templ1Zcc
//00000904 W f__t5Templ1Zii
//--------------------------------------------------------------------------
int main(int argc, char** argv)
{
TestClass<int>::f(1);
TestClass<char>::f('a');
cout<<"main/"<<endl;
}
//$Id:$
=====
Philippe_COVAL(a)Yahoo.COM - http://RzR.online.FR
http://rzr.online.fr/utopia.htm # (screen+life)saver
__________________________________________________
Do You Yahoo!?
Got something to say? Say it better with Yahoo! Video Mail
http://mail.yahoo.com
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 2.8.1 template bug,
Philippe COVAL <=