STL redundancy
why did they make a function make_pair?
1. make_pair(12,10);
2. pair<int,int>(12,10);
1 and 2 does the same thing... and I prefer 2 because sometimes the template resolution for types fails in the types like:
make_pair("some string",12);
because some compilers won't accept a conversion from char* to std::string. In some cases where we expect it to generate a pair< std::string, int > it generates pair< char*, int >. And fully qualifying make_pair with a string and an int would remove the only reason to use make_pair, which is the absense of the the qualifiers.
So can anyone clear this up? Seems redundant
1. make_pair(12,10);
2. pair<int,int>(12,10);
1 and 2 does the same thing... and I prefer 2 because sometimes the template resolution for types fails in the types like:
make_pair("some string",12);
because some compilers won't accept a conversion from char* to std::string. In some cases where we expect it to generate a pair< std::string, int > it generates pair< char*, int >. And fully qualifying make_pair with a string and an int would remove the only reason to use make_pair, which is the absense of the the qualifiers.
So can anyone clear this up? Seems redundant
