OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
generate_array< T, N, F > Struct Template Reference

Main class to generate compile-time array. More...

Detailed Description

template<class T, size_t N, template< size_t, size_t > class F>
struct generate_array< T, N, F >

Main class to generate compile-time array.

A compile time array is for example

const size_t array[5] = {1,2,3,4,5}

Metafunction definition

Usage

const size_t count = 5;
typedef typename ::generate_array<size_t,count, MetaFunc>::result ct_test;
// ct_test::data is equivalent to const size_t [5] = {5,6,7,8,9}
for (size_t i = 0 ; i < count; ++i)
{
const size_t ct_val = ct_test::data[i];
BOOST_REQUIRE_EQUAL(ct_val,count+i);
}
Parameters
Tis the type ot the output array
Nsize of the sequence
FMeta function it take two template arguments

Definition at line 171 of file ct_array.hpp.

#include <ct_array.hpp>

Public Types

typedef generate_array_impl< T, N-1, N, F >::result result
 

Member Typedef Documentation

◆ result

template<class T , size_t N, template< size_t, size_t > class F>
typedef generate_array_impl<T,N-1,N,F>::result generate_array< T, N, F >::result

Definition at line 172 of file ct_array.hpp.


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