From: Chris Lattner Date: Mon, 26 Nov 2001 18:49:33 +0000 (+0000) Subject: Allow output of manipulators for GCC 2.96 compatibility X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=1c3d5169be81e5e91d96b96078ad4f698636383b;p=oota-llvm.git Allow output of manipulators for GCC 2.96 compatibility git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1365 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Assembly/CachedWriter.h b/include/llvm/Assembly/CachedWriter.h index 7996982de49..af1b246fa65 100644 --- a/include/llvm/Assembly/CachedWriter.h +++ b/include/llvm/Assembly/CachedWriter.h @@ -62,12 +62,16 @@ public: inline CachedWriter &operator<<(const PointerType *X) { return *this << (const Value*)X; } -}; -template -inline CachedWriter &operator<<(CachedWriter &CW, const X &v) { - CW.Out << v; - return CW; -} + inline CachedWriter &operator<<(ostream &(&Manip)(ostream &)) { + Out << Manip; return *this; + } + + template + inline CachedWriter &operator<<(const X &v) { + Out << v; + return *this; + } +}; #endif