1
아무도이 함수 객체가 지정된 유형을 필요로하지 않는 이유를 말할 수 있습니까?왜이 함수 객체는 지정이 필요하지 않습니까?
class StringPtrTmplLess
{
public:
template<typename PtrType>
bool operator()(const PtrType * lhs, const PtrType * rhs)
{
return *lhs < *rhs;
}
};
int main()
{
set<string*, StringPtrTmplLess> s2;
return 0;
}
컴파일러는 어떤 유형의 StringPtrTmplLess를 초기화 할 것인지 컴파일러에서 어떻게 알 수 있습니까?