[[ blog 이사 과정에서 정확한 posting날짜가 분실됨. 년도와 분기 정도는 맞지 않을까? ]]
We can use 'typename' in template class.
We can use 'typename' in template class.
template class C { typename T::bT* a; }
But, keyword 'typename' cannot be used outside template. So, following is incorrect syntax.
class A; class B { A* a; typename A::bT* b; // error here! };
So, in this case, class A's definition should be included before definition of class B.
It's just small information about using 'typename'.
'Language > C&C++' 카테고리의 다른 글
[C/C++] Using Reference as function parameter... (0) | 2008.05.02 |
---|---|
[C++] C++ Pointer fixups... (0) | 2008.04.26 |
[C/C++] Abusing throwing exception drops performance severely. (0) | 2008.04.10 |
[C/C++] Attention! Integer-operation to avoid float-operation... (0) | 2008.03.21 |
[C/C++] API to getting bufferred data... (0) | 2008.01.06 |