From c6831e83ddedc7d86c6277a7d104f56e6548f931 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Thu, 28 Aug 2014 12:02:47 +0200 Subject: [PATCH] karma: support boost::recursive_wrapper --- include/boost/spirit/home/karma/detail/extract_from.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/boost/spirit/home/karma/detail/extract_from.hpp b/include/boost/spirit/home/karma/detail/extract_from.hpp index 558d056352..9ef807886d 100644 --- a/include/boost/spirit/home/karma/detail/extract_from.hpp +++ b/include/boost/spirit/home/karma/detail/extract_from.hpp @@ -18,6 +18,7 @@ #include #include +#include /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace spirit { namespace traits @@ -116,6 +117,19 @@ namespace boost { namespace spirit { namespace traits } }; + // This handles recursive variants. + template + struct extract_from_attribute, Exposed> + { + typedef Attribute const& type; + + template + static type call(recursive_wrapper const& attr, Context& ctx) + { + return extract_from(attr.get(), ctx); + } + }; + /////////////////////////////////////////////////////////////////////////// template struct extract_from_container