To reproduce:
1. Write UTF16ToUTF8(s) without the base:: qualifier
Expected result:
Fails to compile on all platforms.
Actual result:
Compiles on Linux and Mac. Fails to compile on Windows.
Cause:
On Linux and Mac, base::string16 is a typedef for std::basic_string<char16, base::string16_char_traits>. Koenig lookup find the base::string16_char_traits type and adds base:: to the associated set of namespaces.
Although the one I found is UTF16ToUTF8, the same issue will apply to any function in base:: which takes a base::string16 argument.
Comment 1 by ricea@chromium.org
, Aug 7 2017