Re: [boost] loglite - A logging library (JD) (Zachary Turner)

2 Nov
2009
2 Nov
'09
2:15 a.m.
I've always found it was easiest to do something like:
namespace boost { namespace filesystem { #if defined(_WIN32) || defined(WIN64) typedef wpath npath; #else typedef path npath; #endif } }
and then use boost::filesystem::npath everywhere. Performance isn't generally the bottleneck when dealing with the filesystem, but why even bother with so many behind-the-scenes conversions when you can just as easily store everything in the type the O/S is expecting in the first place with a simple typedef?
That's handy when only OS API is involved, but if you have to use it other Libraries which are only string-ready, e.g. LIGLITE, you have no choice. Even Some popular Boost libraries are only for strings, Boost.Test is one.
5699
Age (days ago)
5699
Last active (days ago)
0 comments
1 participants
participants (1)
-
Tan, Tom (Shanghai)