OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
v_transform_two< H, arg0, L > Struct Template Reference

Detailed Description

template<template< typename, typename > class H, typename arg0, typename L>
struct v_transform_two< H, arg0, L >

It transform a boost::fusion::vector to another boost::fusion::vector applying a meta-function H on each element

Parameters
H2-argument metafunction (is a structure with typedef type)
Lboost::fusion::vector

Meta-function definition

template <typename arg0, typename T>
struct Ftwo
{
typedef aggregate<T> type;
};

Usage

typedef boost::mpl::vector<float,float,float[3]> bfv;
// tbvf is boost::fusion::vector<scalar<float>,scalar<float>,scalar<float[3]>>
bool val = std::is_same<boost::mpl::at<tbfv,boost::mpl::int_<0>>::type,aggregate<float>>::value;
BOOST_REQUIRE_EQUAL(val,true);
val = std::is_same<boost::mpl::at<tbfv,boost::mpl::int_<1>>::type,aggregate<float>>::value;
BOOST_REQUIRE_EQUAL(val,true);
val = std::is_same<boost::mpl::at<tbfv,boost::mpl::int_<2>>::type,aggregate<float[3]>>::value;
BOOST_REQUIRE_EQUAL(val,true);

Definition at line 178 of file variadic_to_vmpl.hpp.

#include <variadic_to_vmpl.hpp>

Public Types

typedef boost::mpl::reverse< L >::type reversed_
 reverse the sequence
 
typedef seq_traits_impl< reversed_ >::first_ first
 first element
 
typedef seq_traits_impl< reversed_ >::last_ last
 last element
 
typedef exit_impl< first, last >::type exit_
 calculate the exit condition
 
typedef v_transform_two_impl< H, arg0, first, last, exit_::value >::type type
 generate the boost::fusion::vector apply H on each term
 

The documentation for this struct was generated from the following file: