From 96ae58a4b5e7d404299bcce7c4d8ea475acc8066 Mon Sep 17 00:00:00 2001 From: Jens Glaser Date: Mon, 11 May 2020 19:38:41 -0400 Subject: [PATCH] add additional type_traits methods --- jitify.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/jitify.hpp b/jitify.hpp index e70dced..9b2eb5a 100644 --- a/jitify.hpp +++ b/jitify.hpp @@ -1709,6 +1709,20 @@ static const char* jitsafe_header_type_traits = R"( template struct is_function : true_type {}; //regular template struct is_function : true_type {}; // variadic + template struct make_signed { typedef T type; }; + template<> struct make_signed { typedef signed char type; }; + template<> struct make_signed { typedef signed short type; }; + template<> struct make_signed { typedef signed int type; }; + template<> struct make_signed { typedef signed long type; }; + template<> struct make_signed { typedef signed long long type; }; + + template struct make_unsigned { typedef T type; }; + template<> struct make_unsigned { typedef unsigned char type; }; + template<> struct make_unsigned { typedef unsigned short type; }; + template<> struct make_unsigned { typedef unsigned int type; }; + template<> struct make_unsigned { typedef unsigned long type; }; + template<> struct make_unsigned { typedef unsigned long long type; }; + template struct result_of; template struct result_of {