12 #define RAII(...) xtd::_::_RAII UNIQUE_IDENTIFIER(raii_object)([&](){ __VA_ARGS__ ; }); 
   22       template <
typename _Ty>
 
   23       _RAII(_Ty newval) : _fn(newval){}
 
   25       std::function<void()> _fn;
 
   30   template <
typename _Ty> constexpr uint32_t hidword(_Ty value){
 
   31     static_assert(
sizeof(_Ty) > 4, 
"parameter is <= 32 bits wide");
 
   32     return ((uint32_t)(((value) >> 32) & 0xffffffff));
 
   34   template <
typename _Ty> constexpr uint32_t lodword(_Ty value){
 
   35     static_assert(
sizeof(_Ty) > 4, 
"parameter is <= 32 bits wide");
 
   36     return ((uint32_t)((value) & 0xffffffff));
 
   47   template <> 
struct intrinsic_of_size<4>{ 
using type = uint32_t; };
 
   48   template <> 
struct intrinsic_of_size<8>{ 
using type = uint64_t; };
 
   70   template <
typename _Ty> constexpr 
typename processor_intrinsic<_Ty>::type 
intrinsic_cast(_Ty src){
 
   73   template <
typename _Ty> constexpr 
typename processor_intrinsic<_Ty*>::type 
intrinsic_cast(
const _Ty * src){
 
   74     return reinterpret_cast<typename processor_intrinsic<_Ty>::type
>(src);
 
   79     template <size_t, 
typename ...> 
struct last_t;
 
   80     template <
size_t _index, 
typename _HeadT, 
typename ... _TailT> 
struct last_t<_index, _HeadT, _TailT...>{
 
   81       using type = 
typename last_t<_index - 1, _TailT...>::type;
 
   83     template <
typename _HeadT> 
struct last_t<1, _HeadT>{
 
   87   template <
typename ... _Tys> 
struct last{
 
   88     using type = 
typename _::last_t<
sizeof...(_Tys), _Tys...>::type;
 
   94   template <
typename ...> 
struct task;
 
   96     template <
typename _Ty> _Ty&& operator()(_Ty&& src){ 
return std::move(src); }
 
   99   template <
typename _HeadT, 
typename ... _TailT> 
struct task<_HeadT, _TailT...>{
 
  100     using final_task = 
typename last<_HeadT, _TailT...>::type;
 
  101     using return_type = decltype( 
typename std::decay<final_task>::type() );
 
  103     template <
typename _ParamT>
 
  104     return_type operator()(_ParamT oParam)
 const{
 
  106       task<_TailT...> oTail;
 
  107       return oTail(oHead(oParam));
 
  115   template <
typename, 
typename...> 
struct is_a;
 
  116   template <
typename _Ty> 
struct is_a<_Ty> : std::false_type {};
 
  117   template <
typename _Ty, 
typename ... _TailT> 
struct is_a<_Ty, _Ty, _TailT...> : std::true_type{ 
using type = _Ty; };
 
  118   template <
typename _Ty, 
typename _HeadT, 
typename ... _TailT> 
struct is_a<_Ty, _HeadT, _TailT...> : 
is_a<_Ty, _TailT...>{ 
using type = _Ty; };
 
  123   template <
typename _ReturnT, 
typename _HeadT, 
typename ... _TailT> 
struct get_parameter<0, _ReturnT(_HeadT, _TailT...)>{
 
  126   template <
int _ParamNum, 
typename _ReturnT, 
typename _HeadT, 
typename ... _TailT> 
struct get_parameter<_ParamNum, _ReturnT(_HeadT, _TailT...)>{
 
  127     using type = 
typename get_parameter<_ParamNum-1, _ReturnT(_TailT...)>::type;
 
  136   template <
typename _ChT, _ChT _val> 
struct lower_case { 
static const _ChT value = _val; };
 
  138   template <> 
struct lower_case < char, 'A' > { 
static constexpr 
char value = 
'a'; };
 
  139   template <> 
struct lower_case < char, 'B' > { 
static constexpr 
char value = 
'b'; };
 
  140   template <> 
struct lower_case < char, 'C' > { 
static constexpr 
char value = 
'c'; };
 
  141   template <> 
struct lower_case < char, 'D' > { 
static constexpr 
char value = 
'd'; };
 
  142   template <> 
struct lower_case < char, 'E' > { 
static constexpr 
char value = 
'e'; };
 
  143   template <> 
struct lower_case < char, 'F' > { 
static constexpr 
char value = 
'f'; };
 
  144   template <> 
struct lower_case < char, 'G' > { 
static constexpr 
char value = 
'g'; };
 
  145   template <> 
struct lower_case < char, 'H' > { 
static constexpr 
char value = 
'h'; };
 
  146   template <> 
struct lower_case < char, 'I' > { 
static constexpr 
char value = 
'i'; };
 
  147   template <> 
struct lower_case < char, 'J' > { 
static constexpr 
char value = 
'j'; };
 
  148   template <> 
struct lower_case < char, 'K' > { 
static constexpr 
char value = 
'k'; };
 
  149   template <> 
struct lower_case < char, 'L' > { 
static constexpr 
char value = 
'l'; };
 
  150   template <> 
struct lower_case < char, 'M' > { 
static constexpr 
char value = 
'm'; };
 
  151   template <> 
struct lower_case < char, 'N' > { 
static constexpr 
char value = 
'n'; };
 
  152   template <> 
struct lower_case < char, 'O' > { 
static constexpr 
char value = 
'o'; };
 
  153   template <> 
struct lower_case < char, 'P' > { 
static constexpr 
char value = 
'p'; };
 
  154   template <> 
struct lower_case < char, 'Q' > { 
static constexpr 
char value = 
'q'; };
 
  155   template <> 
struct lower_case < char, 'R' > { 
static constexpr 
char value = 
'r'; };
 
  156   template <> 
struct lower_case < char, 'S' > { 
static constexpr 
char value = 
's'; };
 
  157   template <> 
struct lower_case < char, 'T' > { 
static constexpr 
char value = 
't'; };
 
  158   template <> 
struct lower_case < char, 'U' > { 
static constexpr 
char value = 
'u'; };
 
  159   template <> 
struct lower_case < char, 'V' > { 
static constexpr 
char value = 
'v'; };
 
  160   template <> 
struct lower_case < char, 'W' > { 
static constexpr 
char value = 
'w'; };
 
  161   template <> 
struct lower_case < char, 'X' > { 
static constexpr 
char value = 
'x'; };
 
  162   template <> 
struct lower_case < char, 'Y' > { 
static constexpr 
char value = 
'y'; };
 
  163   template <> 
struct lower_case < char, 'Z' > { 
static constexpr 
char value = 
'z'; };
 
  165   template <> 
struct lower_case < wchar_t, L'A' > { 
static constexpr 
wchar_t value = L
'a'; };
 
  166   template <> 
struct lower_case < wchar_t, L'B' > { 
static constexpr 
wchar_t value = L
'b'; };
 
  167   template <> 
struct lower_case < wchar_t, L'C' > { 
static constexpr 
wchar_t value = L
'c'; };
 
  168   template <> 
struct lower_case < wchar_t, L'D' > { 
static constexpr 
wchar_t value = L
'd'; };
 
  169   template <> 
struct lower_case < wchar_t, L'E' > { 
static constexpr 
wchar_t value = L
'e'; };
 
  170   template <> 
struct lower_case < wchar_t, L'F' > { 
static constexpr 
wchar_t value = L
'f'; };
 
  171   template <> 
struct lower_case < wchar_t, L'G' > { 
static constexpr 
wchar_t value = L
'g'; };
 
  172   template <> 
struct lower_case < wchar_t, L'H' > { 
static constexpr 
wchar_t value = L
'h'; };
 
  173   template <> 
struct lower_case < wchar_t, L'I' > { 
static constexpr 
wchar_t value = L
'i'; };
 
  174   template <> 
struct lower_case < wchar_t, L'J' > { 
static constexpr 
wchar_t value = L
'j'; };
 
  175   template <> 
struct lower_case < wchar_t, L'K' > { 
static constexpr 
wchar_t value = L
'k'; };
 
  176   template <> 
struct lower_case < wchar_t, L'L' > { 
static constexpr 
wchar_t value = L
'l'; };
 
  177   template <> 
struct lower_case < wchar_t, L'M' > { 
static constexpr 
wchar_t value = L
'm'; };
 
  178   template <> 
struct lower_case < wchar_t, L'N' > { 
static constexpr 
wchar_t value = L
'n'; };
 
  179   template <> 
struct lower_case < wchar_t, L'O' > { 
static constexpr 
wchar_t value = L
'o'; };
 
  180   template <> 
struct lower_case < wchar_t, L'P' > { 
static constexpr 
wchar_t value = L
'p'; };
 
  181   template <> 
struct lower_case < wchar_t, L'Q' > { 
static constexpr 
wchar_t value = L
'q'; };
 
  182   template <> 
struct lower_case < wchar_t, L'R' > { 
static constexpr 
wchar_t value = L
'r'; };
 
  183   template <> 
struct lower_case < wchar_t, L'S' > { 
static constexpr 
wchar_t value = L
's'; };
 
  184   template <> 
struct lower_case < wchar_t, L'T' > { 
static constexpr 
wchar_t value = L
't'; };
 
  185   template <> 
struct lower_case < wchar_t, L'U' > { 
static constexpr 
wchar_t value = L
'u'; };
 
  186   template <> 
struct lower_case < wchar_t, L'V' > { 
static constexpr 
wchar_t value = L
'v'; };
 
  187   template <> 
struct lower_case < wchar_t, L'W' > { 
static constexpr 
wchar_t value = L
'w'; };
 
  188   template <> 
struct lower_case < wchar_t, L'X' > { 
static constexpr 
wchar_t value = L
'x'; };
 
  189   template <> 
struct lower_case < wchar_t, L'Y' > { 
static constexpr 
wchar_t value = L
'y'; };
 
  190   template <> 
struct lower_case < wchar_t, L'Z' > { 
static constexpr 
wchar_t value = L
'z'; };
 
Determine if a type is specified in a list. 
 
helper class for general purpose RAII rarely created directly. 
 
meta-function to get the processor intrinsic storage for a type. 
 
Gets the type of a parameter in a method declaration. 
 
chains together multiple methods in a single task 
 
constexpr processor_intrinsic< _Ty >::type intrinsic_cast(_Ty src)
casts a pointer to the processor intrinsic storage type 
 
meta-function to get the intrinsic of a specified size 
 
meta-function to convert a static upper case ascii character to lower case 
 
host, target and build configurations and settings Various components are purpose built for specific ...