summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/Msg.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/cpp/src/qpid/Msg.h b/cpp/src/qpid/Msg.h
index f29235f1ba..702bb0a10e 100644
--- a/cpp/src/qpid/Msg.h
+++ b/cpp/src/qpid/Msg.h
@@ -45,13 +45,16 @@ struct Msg {
operator std::string() const { return str(); }
};
-template <class T> const Msg& operator<<(const Msg& m, const T& t) { const_cast<std::ostringstream&>(m.os)<<t; return m; }
-std::ostream& operator<<(std::ostream& o, const Msg& m) { return o<<m.str(); }
+inline template <class T> const Msg& operator<<(const Msg& m, const T& t) {
+ const_cast<std::ostringstream&>(m.os)<<t; return m;
+}
+
+inline std::ostream& operator<<(std::ostream& o, const Msg& m) {
+ return o<<m.str();
+}
/** Construct a message using operator << and append (file:line) */
#define QPID_MSG(message) Msg() << message << " (" << __FILE__ << ":" << __LINE__ << ")"
-using namespace std;
-
} // namespace qpid