[ CnUnix ] in KIDS 글 쓴 이(By): MissMr (아까비) 날 짜 (Date): 2005년 5월 25일 수요일 오후 06시 27분 41초 제 목(Title): Re: C++ template질문. T로 어떤 형식의 인자가 넘어왔는지를 알고자 하시는것 같습니다만... 맞나요? MSDN의 예제를 첨부하면... If the expression is neither a pointer nor a reference to a base class of the object, the result is a type_info reference representing the static type of the expression. typeid can also be used in templates to determine the type of a template parameter: template < typename T > T max( T arg1, T arg2 ) { cout << typeid( T ).name() << "s compared." << endl; return ( arg1 > arg2 ? arg1 : arg2 ); } |