diff --git a/src/Wt/Dbo/StringStream.h b/src/Wt/Dbo/StringStream.h index 66a183fbf6..f3528e96c9 100644 --- a/src/Wt/Dbo/StringStream.h +++ b/src/Wt/Dbo/StringStream.h @@ -10,6 +10,7 @@ #include #include +#include #include #include diff --git a/src/Wt/WStringStream.C b/src/Wt/WStringStream.C index cc960c6bfb..2a0eb0464a 100644 --- a/src/Wt/WStringStream.C +++ b/src/Wt/WStringStream.C @@ -116,13 +116,6 @@ WStringStream& WStringStream::operator<< (char c) return *this; } -WStringStream& WStringStream::operator<< (char *s) -{ - append(s, std::strlen(s)); - - return *this; -} - WStringStream& WStringStream::operator<< (const std::string& s) { append(s.data(), s.length()); diff --git a/src/Wt/WStringStream.h b/src/Wt/WStringStream.h index 1f9a800284..e1a731f7c6 100644 --- a/src/Wt/WStringStream.h +++ b/src/Wt/WStringStream.h @@ -8,6 +8,7 @@ #define WT_WSTRING_STREAM_H_ #include +#include #include #include #include @@ -98,31 +99,18 @@ class WT_API WStringStream */ void append(const char *s, int length); -#ifndef WT_TARGET_JAVA - /* - * Should not be implemented but is needed to support the specialization - * for string literals ! - */ - template - inline WStringStream& operator<< (T t) { - WStringStream please_cast_to_a_supported_type = t; - please_cast_to_a_supported_type << 'a'; // silence compiler for normal case - return *this; - } - - template - WStringStream& operator<< (const char (&s)[N]) { - append(s, N-1); return *this; - } -#endif // WT_TARGET_JAVA - /*! \brief Appends a character. */ WStringStream& operator<< (char); /*! \brief Appends a C string. */ - WStringStream& operator<< (char *s); + WStringStream& operator<< (const char *s) + { + append(s, std::strlen(s)); + + return *this; + } /*! \brief Appends a C++ string. */ diff --git a/src/web/EscapeOStream.C b/src/web/EscapeOStream.C index 38ec68ed3f..fc1ae59a6a 100644 --- a/src/web/EscapeOStream.C +++ b/src/web/EscapeOStream.C @@ -161,16 +161,6 @@ void EscapeOStream::append(const char *s, std::size_t len) put(s, *this); } -EscapeOStream& EscapeOStream::operator<< (char *s) -{ - if (c_special_ == 0) - stream_ << s; - else - put(s, *this); - - return *this; -} - void EscapeOStream::append(const std::string& s, const EscapeOStream& rules) { if (rules.c_special_ == 0) diff --git a/src/web/EscapeOStream.h b/src/web/EscapeOStream.h index 04d8dc529a..be1d8c5469 100644 --- a/src/web/EscapeOStream.h +++ b/src/web/EscapeOStream.h @@ -33,22 +33,17 @@ class WT_API EscapeOStream void append(const std::string& s, const EscapeOStream& rules); void append(const char *s, std::size_t len); -#ifndef WT_TARGET_JAVA - /* - * Should not be implemented but is needed to support the specialization - * for string literals ! - */ - template - inline EscapeOStream& operator<< (T t); - - template - EscapeOStream& operator<< (const char (&s)[N]) { - append(s, N-1); return *this; + EscapeOStream& operator<< (char); + EscapeOStream& operator<< (const char *s) + { + if (c_special_ == 0) + stream_ << s; + else + put(s, *this); + + return *this; } -#endif // WT_TARGET_JAVA - EscapeOStream& operator<< (char); - EscapeOStream& operator<< (char *s); EscapeOStream& operator<< (const std::string& s); EscapeOStream& operator<< (int); EscapeOStream& operator<< (long long);