'What problems exist with using CAtlString in a Visual Studio project?

I'm working with a large codebase that is using a mix of ANSI characters and Unicode characters. Currently, there are like 13 home-rolled string classes in the project along with many home-rolled string manipulation functions (not sure why someone needed to write convert_to_upper that uses toupper). I would like to standardize our string handling and from my past work with MFC, I really think using CAtlString is the best solution. Ignoring the "I hate Microsoft" reasons, why would you suggest not using it and what alternative would you suggest? One of the reasons I like CAtlSting is the easy handling of string conversion.

CAtlString myString;
myString = "Hello from ANSI";
myString = L"Hello from Unicode";
CAtlStringA ansiString("ANSI");
CAtlStringW unicodeString(ansiString); //Automatic translation to wide string

This kind of flexibility means we don't have to worry about what the string is. You just use the object.

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source