aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2005-04-14 16:52:42 +0000
committerVincent Richard <[email protected]>2005-04-14 16:52:42 +0000
commit0d024d2bf3a2f2f0ac828933beff9d37a1a05ede (patch)
treecbf633db60c4b3e0be3e926609e1c4adc196977f
parentMoved 'url' and 'urlUtils' classes to 'utility' namespace. (diff)
downloadvmime-0d024d2bf3a2f2f0ac828933beff9d37a1a05ede.tar.gz
vmime-0d024d2bf3a2f2f0ac828933beff9d37a1a05ede.zip
Fixed compiler error with VC++6.
-rw-r--r--vmime/utility/stream.hpp16
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)