
[Please do not mail me a copy of your followup]
boost-users@lists.boost.org spake the secret code
I have a string class (tstring) which takes care of narrow <=> wide string conversions, and which provides operators for conversion to std::string and std::wstring:
operator std::wstring &(); operator std::string &(); operator const std::wstring &() const; operator const std::string &() const;
I used to think that implicit conversions were great, until I read "C++ Coding Standards: 101 Rules, Guidelines, and Best Practices" by Sutter and Alexandrescu. Now I eschew implicit conversions and use an explicit conversion where needed. I know that doesn't really answer your question about why it used to work and why it doesn't anymore, but had you written the code with an explicit conversion to std::string, it would have worked before and would still work now. I guess that shows the wisdom of why implicit conversions should be avoided... -- "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download http://www.xmission.com/~legalize/book/download/index.html Legalize Adulthood! http://blogs.xmission.com/legalize/