http://stackoverflow.com/questions/19876746/stdtolower-and-visual-studio-2013
Http://forums.codeguru.com/showthread.php?489969-no-matching-function-transform
std::tolower
is overloaded in C + +, it ' s declared in as <cctype>
int tolower(int);
And also in as <locale>
template<CharT> CharT tolower(CharT, const locale&);
So when you say " std::tolower
" you get a ambiguous(blurry) reference to an overloaded function.
- Why
::tolower
version is working?
When you include the <cctype>
one-argument overload are declared in namespace std
and mightalso are declared in the Global namespace, depending on the compiler. If you include then <ctype.h>
it's guaranteed to being included in the global namespace, and would work ::tolower
(although note Dietm Ar ' s points about when it's not safe. The two-argument overload from <locale>
are never declared in the global namespace, so ::tolower
never refers to the two-argument Overload.
2. Why isn't std::tolower
working in Std::transform?
See above, it's an overloaded name.
No matching function transform?