diff options
| -rw-r--r-- | vmime/utility/stream.hpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vmime/utility/stream.hpp b/vmime/utility/stream.hpp index fa7186d1..91f3f573 100644 --- a/vmime/utility/stream.hpp +++ b/vmime/utility/stream.hpp @@ -27,6 +27,10 @@ #include "vmime/types.hpp" +#if defined(_MSC_VER) && (_MSC_VER <= 1200) // VC++6 +# include <cstring> +#endif + namespace vmime { namespace utility { @@ -115,6 +119,16 @@ outputStream& operator<<(outputStream& os, const string& str); outputStream& operator<<(outputStream& os, const stream::value_type c); +#if defined(_MSC_VER) && (_MSC_VER <= 1200) // Internal compiler error with VC++6 + +inline outputStream& operator<<(outputStream& os, const char* str) +{ + os.write(str, ::strlen(str)); + return (os); +} + +#else + template <int N> outputStream& operator<<(outputStream& os, const char (&str)[N]) { @@ -122,6 +136,8 @@ outputStream& operator<<(outputStream& os, const char (&str)[N]) return (os); } +#endif // defined(_MSC_VER) && (_MSC_VER <= 1200) + template <typename T> outputStream& operator<<(outputStream& os, const T& t) |
