Skip to content

Instantly share code, notes, and snippets.

@dcolish
Created March 17, 2013 02:56
Show Gist options
  • Select an option

  • Save dcolish/5179358 to your computer and use it in GitHub Desktop.

Select an option

Save dcolish/5179358 to your computer and use it in GitHub Desktop.
diff --git a/xapian-core/common/pretty.h b/xapian-core/common/pretty.h
index e5418b3..47f0760 100644
--- a/xapian-core/common/pretty.h
+++ b/xapian-core/common/pretty.h
@@ -39,6 +39,9 @@ struct PrettyOStream {
S & os;
PrettyOStream(S & os_) : os(os_) { }
+ template <typename T> PrettyOStream & operator|(const T & t){
+ return *this | t;
+ }
};
struct Literal {
@@ -340,11 +343,4 @@ operator<<(PrettyOStream<S> &ps, Xapian::Internal::intrusive_ptr<const T> t) {
return ps << t;
}
-template<class S, typename T>
-inline PrettyOStream<S> &
-operator|(PrettyOStream<S> &ps, const T & t) {
- ps.os << ", ";
- return ps << t;
-}
-
#endif // XAPIAN_INCLUDED_PRETTY_H
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment