On Wednesday 09 July 2014 14:42:55 Beman Dawes wrote:
I'm working on an update of Boost.Filesystem that adds support for the C++11 char16_t, char23_t, u16string, and u32string types.
For compilers that don't yet support these types, a header cxx11_char_types.hpp (see attached) provides emulation that is good enough for filesystem, and is probably useful for other libraries and for user code too. We discussed this header several years ago, and I've been using it since then.
Where should this header live? It can certainly go in libs/filesystem/include/boost/filesystem, but that doesn't really expose it to general Boost users. Is there a better place, but without introducing unwanted dependencies?
Are string typedefs generally useful in C++03? E.g. does std::char_traitsboost::char16::length() work? It would be needed if one to construct u16string from a literal. If not these typedefs should not be exposed to users, IMHO. Otherwise, cstdint.hpp is in Boost.Config, and this header offers similar functionality.