Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57694 - trunk/boost/format
From: Samuel.Krempp_at_[hidden]
Date: 2009-11-15 18:03:27


Author: samuel_krempp
Date: 2009-11-15 18:03:26 EST (Sun, 15 Nov 2009)
New Revision: 57694
URL: http://svn.boost.org/trac/boost/changeset/57694

Log:
support for enums on gcc (patch by Steven Watanabe)
fixes Ticket #2015
Text files modified:
   trunk/boost/format/format_class.hpp | 13 +++++++++++++
   1 files changed, 13 insertions(+), 0 deletions(-)

Modified: trunk/boost/format/format_class.hpp
==============================================================================
--- trunk/boost/format/format_class.hpp (original)
+++ trunk/boost/format/format_class.hpp 2009-11-15 18:03:26 EST (Sun, 15 Nov 2009)
@@ -68,6 +68,19 @@
             { return io::detail::feed<CharT, Tr, Alloc, T&>(*this,x); }
 #endif
 
+#ifdef __GNUC__
+ // GCC can't handle anonymous enums without some help
+ // ** arguments passing ** //
+ basic_format& operator%(const int& x)
+ { return io::detail::feed<CharT, Tr, Alloc, const int&>(*this,x); }
+
+#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST
+ basic_format& operator%(int& x)
+ { return io::detail::feed<CharT, Tr, Alloc, int&>(*this,x); }
+#endif
+#endif
+
+
         // ** object modifying **//
         template<class T>
         basic_format& bind_arg(int argN, const T& val)


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk