Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84937 - trunk/boost/fusion/container/map
From: eric_at_[hidden]
Date: 2013-07-01 22:10:05


Author: eric_niebler
Date: 2013-07-01 22:10:04 EDT (Mon, 01 Jul 2013)
New Revision: 84937
URL: http://svn.boost.org/trac/boost/changeset/84937

Log:
specialization of convert_impl for map_tag, refs #8759

Text files modified:
   trunk/boost/fusion/container/map/convert.hpp | 24 ++++++++++++++++++++++++
   1 files changed, 24 insertions(+), 0 deletions(-)

Modified: trunk/boost/fusion/container/map/convert.hpp
==============================================================================
--- trunk/boost/fusion/container/map/convert.hpp Mon Jul 1 15:35:37 2013 (r84936)
+++ trunk/boost/fusion/container/map/convert.hpp 2013-07-01 22:10:04 EDT (Mon, 01 Jul 2013) (r84937)
@@ -80,6 +80,30 @@
         typedef result_of::as_map<Sequence const> gen;
         return gen::call(fusion::begin(seq), fusion::end(seq));
     }
+
+ namespace extension
+ {
+ template <typename T>
+ struct convert_impl;
+
+ template <>
+ struct convert_impl<map_tag>
+ {
+ template <typename Sequence>
+ struct apply
+ {
+ typedef typename
+ result_of::as_map<Sequence>::type
+ type;
+
+ static type call(Sequence& seq)
+ {
+ typedef result_of::as_map<Sequence> gen;
+ return gen::call(fusion::begin(seq), fusion::end(seq));
+ }
+ };
+ };
+ }
 }}
 
 #endif


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