OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
vmpl_sum_constant< ele, boost::mpl::vector< vars ... > > Struct Template Reference

Detailed Description

template<unsigned int ele, typename ... vars>
struct vmpl_sum_constant< ele, boost::mpl::vector< vars ... > >

Take a boost::mpl::vector of boost::mpl::int_ and sum the element ele

vmpl_sum_constant<boost::mpl::vector<boost::mpl::int_<2>,boost::mpl::int_<4>,boost::mpl::int<8>>, 5>type is converted into

boost::mpl::vector<int_<7>,int_<9>,int_<13>>

typedef vmpl_sum_constant<5,bfv>::type vsc;
BOOST_REQUIRE_EQUAL(boost::mpl::size<vsc>::type::value,4);
bool val = std::is_same<boost::mpl::at<vsc,boost::mpl::int_<0>>::type,boost::mpl::int_<6>>::value;
BOOST_REQUIRE_EQUAL(val,true);
val = std::is_same<boost::mpl::at<vsc,boost::mpl::int_<1>>::type,boost::mpl::int_<9>>::value;
BOOST_REQUIRE_EQUAL(val,true);
val = std::is_same<boost::mpl::at<vsc,boost::mpl::int_<2>>::type,boost::mpl::int_<10>>::value;
BOOST_REQUIRE_EQUAL(val,true);
val = std::is_same<boost::mpl::at<vsc,boost::mpl::int_<3>>::type,boost::mpl::int_<14>>::value;
BOOST_REQUIRE_EQUAL(val,true);
boost::mpl::vector< boost::mpl::int_< id >... > type
construct an mpl vector from the variadic
boost::mpl::vector< typename sum_ele< vars, ele >::type ... > type
construct an mpl vector from the variadic

Definition at line 171 of file create_vmpl_sequence.hpp.

#include <create_vmpl_sequence.hpp>

Public Types

typedef boost::mpl::vector< typename sum_ele< vars, ele >::type ... > type
 construct an mpl vector from the variadic
 

Member Typedef Documentation

◆ type

template<unsigned int ele, typename ... vars>
typedef boost::mpl::vector<typename sum_ele<vars,ele>::type ...> vmpl_sum_constant< ele, boost::mpl::vector< vars ... > >::type

construct an mpl vector from the variadic

Definition at line 174 of file create_vmpl_sequence.hpp.


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