Chris@102: // Boost.Geometry (aka GGL, Generic Geometry Library) Chris@102: Chris@102: // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands. Chris@102: // Copyright (c) 2008-2015 Bruno Lalande, Paris, France. Chris@102: // Copyright (c) 2009-2015 Mateusz Loskot, London, UK. Chris@102: Chris@102: // This file was modified by Oracle on 2015. Chris@102: // Modifications copyright (c) 2015, Oracle and/or its affiliates. Chris@102: Chris@102: // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle Chris@102: Chris@102: // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library Chris@102: // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. Chris@102: Chris@102: // Use, modification and distribution is subject to the Boost Software License, Chris@102: // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at Chris@102: // http://www.boost.org/LICENSE_1_0.txt) Chris@102: Chris@102: #ifndef BOOST_GEOMETRY_UTIL_TRANSFORM_VARIANT_HPP Chris@102: #define BOOST_GEOMETRY_UTIL_TRANSFORM_VARIANT_HPP Chris@102: Chris@102: Chris@102: #include Chris@102: #include Chris@102: Chris@102: Chris@102: namespace boost { namespace geometry Chris@102: { Chris@102: Chris@102: Chris@102: /*! Chris@102: \brief Meta-function that takes a Sequence type, an MPL lambda Chris@102: expression and an optional Inserter and returns a variant type over Chris@102: the same types as the initial variant type, each transformed using Chris@102: the lambda expression. Chris@102: \ingroup utility Chris@102: \par Example Chris@102: \code Chris@102: typedef boost::mpl::vector types; Chris@102: typedef transform_variant > transformed; Chris@102: typedef variant result; Chris@102: BOOST_MPL_ASSERT(( equal )); Chris@102: \endcode Chris@102: */ Chris@102: template Chris@102: struct transform_variant: Chris@102: make_variant_over< Chris@102: typename boost::mpl::transform< Chris@102: Sequence, Chris@102: Op, Chris@102: In Chris@102: >::type Chris@102: > Chris@102: {}; Chris@102: Chris@102: Chris@102: /*! Chris@102: \brief Meta-function that takes a boost::variant type and an MPL lambda Chris@102: expression and returns a variant type over the same types as the Chris@102: initial variant type, each transformed using the lambda expression. Chris@102: \ingroup utility Chris@102: \par Example Chris@102: \code Chris@102: typedef variant variant_type; Chris@102: typedef transform_variant > transformed; Chris@102: typedef variant result; Chris@102: BOOST_MPL_ASSERT(( equal )); Chris@102: \endcode Chris@102: */ Chris@102: template Chris@102: struct transform_variant, Op, boost::mpl::na> : Chris@102: make_variant_over< Chris@102: typename boost::mpl::transform< Chris@102: typename variant::types, Chris@102: Op Chris@102: >::type Chris@102: > Chris@102: {}; Chris@102: Chris@102: Chris@102: }} // namespace boost::geometry Chris@102: Chris@102: Chris@102: #endif // BOOST_GEOMETRY_UTIL_TRANSFORM_VARIANT_HPP