int compare(const std::string& s);&

int compare(const std::wstring& s)

{

int c = compare(s.c_str());

return c;

}


int compare(const std::string* s);&

int compare(const std::wstring* s)

{

int c = compare(s->c_str());

return c;

}

/*==============================

접근 오퍼레이터 추론 버전

==============================*/

int compare(const std::string& s);&

int compare(const std::wstring& s);&

int compare(const std::string* s);&

int compare(const std::wstring* s)

{

int c = compare(s.>c_str());

return c;

}

//==============================

이렇게 다중 선언을 만들고 끝에 정의 본문이 나오면


컴파일러에서 자동으로 확장해주는거임


템플릿 한정자에서 지원하는거 보다 훨씬 깔끔하고 간단하게 구현 가능


템플릿 한정자 버전으로 만들 경우 너무 복잡해질거 같아서 생각해봄 


어떰?