Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Data Structures | Macros | Enumerations | Functions
20.meta.trans.other.cpp File Reference
#include <rw_driver.h>
#include <rw/_defs.h>
#include <type_traits>
#include <rw_printf.h>
#include <stdlib.h>
#include <stddef.h>
Include dependency graph for 20.meta.trans.other.cpp:

Go to the source code of this file.

Data Structures

struct  is_char< T >
 
struct  is_char< char >
 
struct  null_t
 
struct  aligned_union_tester< Len, T1, T2, T3, T4, T5, T6, T7, T8 >
 
struct  struct_t
 

Macros

#define TEST(Size, Align)
 
#define TEST(Size)
 
#define TEST(Len, T1)    aligned_union_tester<Len,T1>::test(__LINE__,#T1)
 
#define TEST(Len, T1, T2)    aligned_union_tester<Len,T1,T2>::test(__LINE__,#T1,#T2)
 
#define TEST(Len, T1, T2, T3, T4, T5)    aligned_union_tester<Len,T1,T2,T3,T4,T5>::test(__LINE__,#T1,#T2,#T3,#T4,#T5)
 
#define TEST(Trait, TypeT, TypeU)
 
#define TEST(Cond, Expect)    test_enable_if(__LINE__, #Cond, Cond, Expect)
 
#define TEST(Cond, Expect)    test_enable_if(__LINE__, #Cond, Cond, Expect)
 
#define TEST(Trait, Select, TypeT, TypeU, TypeV)
 

Enumerations

enum  enum_t { E_a = 1 }
 

Functions

template<class T >
int enabled_if_char (typename std::enable_if< is_char< T >::val >::type *=0)
 
template<class T >
int enabled_if_char (typename std::enable_if<!is_char< T >::val >::type *=0)
 
int _cond_if_char (void *)
 
int _cond_if_char (long *)
 
template<class T >
int cond_if_char ()
 
void test_trait (int line, bool select, const char *trait, const char *typeT, const char *typeU, bool success)
 
void test_trait (int line, const char *trait, const char *typeT, const char *typeU, bool success)
 
void test_enable_if (int line, const char *typeT, int got, int exp)
 
void test_aligned_storage (int line, size_t exp_sz, size_t got_sz, size_t exp_al, size_t got_al)
 
size_t max8 (size_t a1, size_t a2, size_t a3, size_t a4, size_t a5, size_t a6, size_t a7, size_t a8)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

◆ TEST [1/9]

#define TEST (   Cond,
  Expect 
)     test_enable_if(__LINE__, #Cond, Cond, Expect)

◆ TEST [2/9]

#define TEST (   Cond,
  Expect 
)     test_enable_if(__LINE__, #Cond, Cond, Expect)

◆ TEST [3/9]

#define TEST (   Len,
  T1 
)     aligned_union_tester<Len,T1>::test(__LINE__,#T1)

◆ TEST [4/9]

#define TEST (   Len,
  T1,
  T2 
)     aligned_union_tester<Len,T1,T2>::test(__LINE__,#T1,#T2)

◆ TEST [5/9]

#define TEST (   Len,
  T1,
  T2,
  T3,
  T4,
  T5 
)     aligned_union_tester<Len,T1,T2,T3,T4,T5>::test(__LINE__,#T1,#T2,#T3,#T4,#T5)

◆ TEST [6/9]

#define TEST (   Size)
Value:
{ \
typedef std::aligned_storage<Size>::type storage_t; \
test_aligned_storage(__LINE__, \
Size, sizeof (storage_t), 0, \
std::alignment_of<storage_t>::value); \
} typedef void __dummy

◆ TEST [7/9]

#define TEST (   Size,
  Align 
)
Value:
{ \
typedef std::aligned_storage<Size, Align>::type storage_t; \
test_aligned_storage(__LINE__, \
Size, sizeof (storage_t), Align, \
std::alignment_of<storage_t>::value); \
} typedef void __dummy

◆ TEST [8/9]

#define TEST (   Trait,
  Select,
  TypeT,
  TypeU,
  TypeV 
)
Value:
test_trait(__LINE__, Select, #Trait, #TypeT, #TypeU, \
std::is_same<Trait<Select,TypeT,TypeU>::type, TypeV>::value)
void test_trait(int line, bool select, const char *trait, const char *typeT, const char *typeU, bool success)
T value(const T &val)

◆ TEST [9/9]

#define TEST (   Trait,
  TypeT,
  TypeU 
)
Value:
test_trait(__LINE__, #Trait, #TypeT, #TypeU, \
std::is_same<Trait<TypeT>::type, TypeU>::value)

Enumeration Type Documentation

◆ enum_t

enum enum_t
Enumerator
E_a 

Definition at line 410 of file 20.meta.trans.other.cpp.

Function Documentation

◆ _cond_if_char() [1/2]

int _cond_if_char ( long *  )

Definition at line 80 of file 20.meta.trans.other.cpp.

◆ _cond_if_char() [2/2]

int _cond_if_char ( void *  )

Definition at line 74 of file 20.meta.trans.other.cpp.

◆ cond_if_char()

template<class T >
int cond_if_char ( )

Definition at line 86 of file 20.meta.trans.other.cpp.

◆ enabled_if_char() [1/2]

template<class T >
int enabled_if_char ( typename std::enable_if< is_char< T >::val >::type *  = 0)

Definition at line 60 of file 20.meta.trans.other.cpp.

◆ enabled_if_char() [2/2]

template<class T >
int enabled_if_char ( typename std::enable_if<!is_char< T >::val >::type *  = 0)

Definition at line 68 of file 20.meta.trans.other.cpp.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 500 of file 20.meta.trans.other.cpp.

◆ max8()

size_t max8 ( size_t  a1,
size_t  a2,
size_t  a3,
size_t  a4,
size_t  a5,
size_t  a6,
size_t  a7,
size_t  a8 
)

Definition at line 227 of file 20.meta.trans.other.cpp.

◆ test_aligned_storage()

void test_aligned_storage ( int  line,
size_t  exp_sz,
size_t  got_sz,
size_t  exp_al,
size_t  got_al 
)

Definition at line 126 of file 20.meta.trans.other.cpp.

◆ test_enable_if()

void test_enable_if ( int  line,
const char *  typeT,
int  got,
int  exp 
)

Definition at line 118 of file 20.meta.trans.other.cpp.

◆ test_trait() [1/2]

void test_trait ( int  line,
bool  select,
const char *  trait,
const char *  typeT,
const char *  typeU,
bool  success 
)

Definition at line 97 of file 20.meta.trans.other.cpp.

◆ test_trait() [2/2]

void test_trait ( int  line,
const char *  trait,
const char *  typeT,
const char *  typeU,
bool  success 
)

Definition at line 109 of file 20.meta.trans.other.cpp.