flexiblesusy is hosted by Hepforge, IPPP Durham
FlexibleSUSY
pp_map.hpp File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EVAL(...)   EVAL4(EVAL4(EVAL4(__VA_ARGS__)))
 
#define EVAL0(...)   __VA_ARGS__
 
#define EVAL1(...)   EVAL0(EVAL0(EVAL0(__VA_ARGS__)))
 
#define EVAL2(...)   EVAL1(EVAL1(EVAL1(__VA_ARGS__)))
 
#define EVAL3(...)   EVAL2(EVAL2(EVAL2(__VA_ARGS__)))
 
#define EVAL4(...)   EVAL3(EVAL3(EVAL3(__VA_ARGS__)))
 
#define MAP(f, ...)   EVAL(MAP1(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0))
 
#define MAP0(f, x, peek, ...)   f(x) MAP_NEXT(peek, MAP1)(f, peek, __VA_ARGS__)
 
#define MAP1(f, x, peek, ...)   f(x) MAP_NEXT(peek, MAP0)(f, peek, __VA_ARGS__)
 
#define MAP_COMMA   ,
 
#define MAP_END(...)
 
#define MAP_GET_END(...)   MAP_GET_END1
 
#define MAP_GET_END1(...)   MAP_GET_END2
 
#define MAP_GET_END2()   0, MAP_END
 
#define MAP_LIST(f, ...)   EVAL(MAP_LIST1(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0))
 
#define MAP_LIST0(f, x, peek, ...)   f(x) MAP_LIST_NEXT(peek, MAP_LIST1)(f, peek, __VA_ARGS__)
 
#define MAP_LIST1(f, x, peek, ...)   f(x) MAP_LIST_NEXT(peek, MAP_LIST0)(f, peek, __VA_ARGS__)
 
#define MAP_LIST_NEXT(test, next)   MAP_LIST_NEXT1(MAP_GET_END test, next)
 
#define MAP_LIST_NEXT1(test, next)   MAP_NEXT0(test, MAP_COMMA next, 0)
 
#define MAP_NEXT(test, next)   MAP_NEXT1(MAP_GET_END test, next)
 
#define MAP_NEXT0(test, next, ...)   next MAP_OUT
 
#define MAP_NEXT1(test, next)   MAP_NEXT0(test, next, 0)
 
#define MAP_OUT
 

Macro Definition Documentation

◆ EVAL

#define EVAL (   ...)    EVAL4(EVAL4(EVAL4(__VA_ARGS__)))

Definition at line 37 of file pp_map.hpp.

◆ EVAL0

#define EVAL0 (   ...)    __VA_ARGS__

Definition at line 32 of file pp_map.hpp.

◆ EVAL1

#define EVAL1 (   ...)    EVAL0(EVAL0(EVAL0(__VA_ARGS__)))

Definition at line 33 of file pp_map.hpp.

◆ EVAL2

#define EVAL2 (   ...)    EVAL1(EVAL1(EVAL1(__VA_ARGS__)))

Definition at line 34 of file pp_map.hpp.

◆ EVAL3

#define EVAL3 (   ...)    EVAL2(EVAL2(EVAL2(__VA_ARGS__)))

Definition at line 35 of file pp_map.hpp.

◆ EVAL4

#define EVAL4 (   ...)    EVAL3(EVAL3(EVAL3(__VA_ARGS__)))

Definition at line 36 of file pp_map.hpp.

◆ MAP

#define MAP (   f,
  ... 
)    EVAL(MAP1(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0))

Applies the function macro f to each of the remaining parameters.

Definition at line 62 of file pp_map.hpp.

◆ MAP0

#define MAP0 (   f,
  x,
  peek,
  ... 
)    f(x) MAP_NEXT(peek, MAP1)(f, peek, __VA_ARGS__)

Definition at line 50 of file pp_map.hpp.

◆ MAP1

#define MAP1 (   f,
  x,
  peek,
  ... 
)    f(x) MAP_NEXT(peek, MAP0)(f, peek, __VA_ARGS__)

Definition at line 51 of file pp_map.hpp.

◆ MAP_COMMA

#define MAP_COMMA   ,

Definition at line 41 of file pp_map.hpp.

◆ MAP_END

#define MAP_END (   ...)

Definition at line 39 of file pp_map.hpp.

◆ MAP_GET_END

#define MAP_GET_END (   ...)    MAP_GET_END1

Definition at line 45 of file pp_map.hpp.

◆ MAP_GET_END1

#define MAP_GET_END1 (   ...)    MAP_GET_END2

Definition at line 44 of file pp_map.hpp.

◆ MAP_GET_END2

#define MAP_GET_END2 ( )    0, MAP_END

Definition at line 43 of file pp_map.hpp.

◆ MAP_LIST

#define MAP_LIST (   f,
  ... 
)    EVAL(MAP_LIST1(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0))

Applies the function macro f to each of the remaining parameters and inserts commas between the results.

Definition at line 68 of file pp_map.hpp.

◆ MAP_LIST0

#define MAP_LIST0 (   f,
  x,
  peek,
  ... 
)    f(x) MAP_LIST_NEXT(peek, MAP_LIST1)(f, peek, __VA_ARGS__)

Definition at line 56 of file pp_map.hpp.

◆ MAP_LIST1

#define MAP_LIST1 (   f,
  x,
  peek,
  ... 
)    f(x) MAP_LIST_NEXT(peek, MAP_LIST0)(f, peek, __VA_ARGS__)

Definition at line 57 of file pp_map.hpp.

◆ MAP_LIST_NEXT

#define MAP_LIST_NEXT (   test,
  next 
)    MAP_LIST_NEXT1(MAP_GET_END test, next)

Definition at line 54 of file pp_map.hpp.

◆ MAP_LIST_NEXT1

#define MAP_LIST_NEXT1 (   test,
  next 
)    MAP_NEXT0(test, MAP_COMMA next, 0)

Definition at line 53 of file pp_map.hpp.

◆ MAP_NEXT

#define MAP_NEXT (   test,
  next 
)    MAP_NEXT1(MAP_GET_END test, next)

Definition at line 48 of file pp_map.hpp.

◆ MAP_NEXT0

#define MAP_NEXT0 (   test,
  next,
  ... 
)    next MAP_OUT

Definition at line 46 of file pp_map.hpp.

◆ MAP_NEXT1

#define MAP_NEXT1 (   test,
  next 
)    MAP_NEXT0(test, next, 0)

Definition at line 47 of file pp_map.hpp.

◆ MAP_OUT

#define MAP_OUT

Definition at line 40 of file pp_map.hpp.