OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
is_typedef_and_data_same< cond, T > Struct Template Reference

check if T::type and T.data has the same type More...

Detailed Description

template<bool cond, typename T>
struct is_typedef_and_data_same< cond, T >

check if T::type and T.data has the same type

Template Parameters
iwhen different from 0 a check is performed otherwise not, the reason of this is that the typedef and data could also not exist producing compilation error, this flag avoid this, it perform the check only if it is safe
T

Example

struct test_typedef_same_data
{
typedef boost::fusion::vector<float,double,float[3]> type;
type data;
};
struct test_typedef_not_same_data
{
typedef boost::fusion::vector<float,double,float[3]> type;
boost::fusion::vector<float,double> data;
};
BOOST_REQUIRE_EQUAL(val, true);
BOOST_REQUIRE_EQUAL(val, false);

return true if the type of T::data is the same of T::type, false otherwise

Definition at line 189 of file common.hpp.

#include <common.hpp>

Public Types

enum  { value = std::is_same<decltype(std::declval<T>().data),typename T::type>::value }
 

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