Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63097 - trunk/boost/spirit/home/support
From: hartmut.kaiser_at_[hidden]
Date: 2010-06-19 08:52:23


Author: hkaiser
Date: 2010-06-19 08:52:23 EDT (Sat, 19 Jun 2010)
New Revision: 63097
URL: http://svn.boost.org/trac/boost/changeset/63097

Log:
Spirit: adding debug support for optional attributes
Text files modified:
   trunk/boost/spirit/home/support/attributes.hpp | 9 +++++++++
   1 files changed, 9 insertions(+), 0 deletions(-)

Modified: trunk/boost/spirit/home/support/attributes.hpp
==============================================================================
--- trunk/boost/spirit/home/support/attributes.hpp (original)
+++ trunk/boost/spirit/home/support/attributes.hpp 2010-06-19 08:52:23 EDT (Sat, 19 Jun 2010)
@@ -867,6 +867,15 @@
         detail::print_attribute_impl(out, val,
             mpl::and_<is_container<T>, not_is_variant<T, void> >());
     }
+
+ template <typename Out, typename T>
+ inline void print_attribute(Out& out, boost::optional<T> const& val)
+ {
+ if (val)
+ print_attribute(out, val);
+ else
+ out << "<empty>";
+ }
 }}}
 
 ///////////////////////////////////////////////////////////////////////////////


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