Files
boost_fusion/include/boost/fusion/sequence/convert.hpp

51 lines
1.4 KiB
C++
Raw Normal View History

/*=============================================================================
2011-09-16 05:30:23 +00:00
Copyright (c) 2001-2011 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_CONVERT_10022005_1442)
#define FUSION_CONVERT_10022005_1442
namespace boost { namespace fusion
{
namespace extension
{
template <typename Tag>
struct convert_impl;
}
namespace result_of
{
template <typename Tag, typename Sequence>
struct convert
{
typedef typename
2013-10-01 23:41:38 +00:00
extension::convert_impl<Tag>::template apply<Sequence>
gen;
typedef typename gen::type type;
};
}
template <typename Tag, typename Sequence>
2014-01-09 17:58:06 -08:00
BOOST_FUSION_GPU_ENABLED
inline typename result_of::convert<Tag, Sequence>::type
convert(Sequence& seq)
{
typedef typename result_of::convert<Tag, Sequence>::gen gen;
return gen::call(seq);
}
template <typename Tag, typename Sequence>
2014-01-09 17:58:06 -08:00
BOOST_FUSION_GPU_ENABLED
inline typename result_of::convert<Tag, Sequence const>::type
convert(Sequence const& seq)
{
typedef typename result_of::convert<Tag, Sequence const>::gen gen;
return gen::call(seq);
}
}}
#endif