cltmp21b.c
来自「开放源码的编译器open watcom 1.6.0版的源代码」· C语言 代码 · 共 35 行
C
35 行
// updated template class explicit instatiation syntax
template< class T >
class X{
public:
void fn( T x );
T v;
};
template< class T >
void X<T>::fn( T x )
{
v = x+2;
}
template< class T >
class Y{
public:
T fnb( T x );
};
template< class T >
T Y<T>::fnb( T x )
{
return( x*x );
}
// explicitly instatiate, they are used in cltemp21.c
template class X< long >;
template struct Y< double >;
// more explicit template type stuff can go here once it is implemented...
// template function
// template member function
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?