Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73587 - trunk/boost/spirit/home/support
From: joel_at_[hidden]
Date: 2011-08-06 20:36:47


Author: djowel
Date: 2011-08-06 20:36:47 EDT (Sat, 06 Aug 2011)
New Revision: 73587
URL: http://svn.boost.org/trac/boost/changeset/73587

Log:
support all const/non-const variations for visitor and variant
Text files modified:
   trunk/boost/spirit/home/support/extended_variant.hpp | 12 ++++++++++++
   1 files changed, 12 insertions(+), 0 deletions(-)

Modified: trunk/boost/spirit/home/support/extended_variant.hpp
==============================================================================
--- trunk/boost/spirit/home/support/extended_variant.hpp (original)
+++ trunk/boost/spirit/home/support/extended_variant.hpp 2011-08-06 20:36:47 EDT (Sat, 06 Aug 2011)
@@ -55,6 +55,18 @@
             return var.apply_visitor(v);
         }
 
+ template <typename F>
+ typename F::result_type apply_visitor(F& v)
+ {
+ return var.apply_visitor(v);
+ }
+
+ template <typename F>
+ typename F::result_type apply_visitor(F& v) const
+ {
+ return var.apply_visitor(v);
+ }
+
         variant_type const& get() const
         {
             return var;


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