OpenFPM_data  0.1.0
Project that contain the implementation and interfaces for basic structure like vectors, grids, graph ... .
 All Data Structures Namespaces Functions Variables Typedefs Friends
v_transform< H, L > Struct Template Reference

Detailed Description

template<template< typename > class H, typename L>
struct v_transform< H, L >

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

Parameters
Hmetafunction (is a structure with typedef type)
Lboost::fusion::vector

Meta-function definition

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,scalar<float>>::value;
BOOST_REQUIRE_EQUAL(val,true);
val = std::is_same<boost::mpl::at<tbfv,boost::mpl::int_<1>>::type,scalar<float>>::value;
BOOST_REQUIRE_EQUAL(val,true);
val = std::is_same<boost::mpl::at<tbfv,boost::mpl::int_<2>>::type,scalar<float[3]>>::value;
BOOST_REQUIRE_EQUAL(val,true);

Definition at line 91 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_impl< H,
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: