현재 일반 컨테이너를 다루는 함수 템플릿을 작성하고 있습니다. in this question이라는 이유 때문에 std::begin()
과 std::end()
을 사용하고 싶습니다. 내 질문은, 여부를 사용해야합니까 :begin() free 함수 사용 방법
std::begin(myContainer)
또는 :
using namespace std; // Better use: "using std::begin"
begin(myContainer)
또는 다른 말로하면, 그것은 std
네임 스페이스 내에서 begin()
과부하 괜찮습니다? 함수의 사용자가 begin()
함수 을 전역 네임 스페이스에 오버로드하도록 허용해야합니까? STL은 어떻게 처리합니까?
밀접하게 관련 : http://stackoverflow.com/q/18780324/1619294 –