Expand Up
@@ -121,76 +121,76 @@ namespace wil
// Mappings of all conversions defined in intsafe.h to intsafe_conversion
// Note: Uppercase types (UINT, DWORD, SIZE_T, etc) and architecture dependent types resolve
// to the base types. The base types are used since they do not vary based on architecture.
template <> constexpr auto intsafe_conversion<__int64, char > = LongLongToChar;
template <> constexpr auto intsafe_conversion<__int64, int > = LongLongToInt;
template <> constexpr auto intsafe_conversion<__int64, long > = LongLongToLong;
template <> constexpr auto intsafe_conversion<__int64, short > = LongLongToShort;
template <> constexpr auto intsafe_conversion<__int64, signed char > = LongLongToInt8;
template <> constexpr auto intsafe_conversion<__int64, unsigned __int64> = LongLongToULongLong;
template <> constexpr auto intsafe_conversion<__int64, unsigned char > = LongLongToUChar;
template <> constexpr auto intsafe_conversion<__int64, unsigned int > = LongLongToUInt;
template <> constexpr auto intsafe_conversion<__int64, unsigned long > = LongLongToULong;
template <> constexpr auto intsafe_conversion<__int64, unsigned short > = LongLongToUShort;
template <> constexpr auto intsafe_conversion<int , char > = IntToChar;
template <> constexpr auto intsafe_conversion<int , short > = IntToShort;
template <> constexpr auto intsafe_conversion<int , signed char > = IntToInt8;
template <> constexpr auto intsafe_conversion<int , unsigned __int64> = IntToULongLong;
template <> constexpr auto intsafe_conversion<int , unsigned char > = IntToUChar;
template <> constexpr auto intsafe_conversion<int , unsigned int > = IntToUInt;
template <> constexpr auto intsafe_conversion<int , unsigned long > = IntToULong;
template <> constexpr auto intsafe_conversion<int , unsigned short > = IntToUShort;
template <> constexpr auto intsafe_conversion<long , char > = LongToChar;
template <> constexpr auto intsafe_conversion<long , int > = LongToInt;
template <> constexpr auto intsafe_conversion<long , short > = LongToShort;
template <> constexpr auto intsafe_conversion<long , signed char > = LongToInt8;
template <> constexpr auto intsafe_conversion<long , unsigned __int64> = LongToULongLong;
template <> constexpr auto intsafe_conversion<long , unsigned char > = LongToUChar;
template <> constexpr auto intsafe_conversion<long , unsigned int > = LongToUInt;
template <> constexpr auto intsafe_conversion<long , unsigned long > = LongToULong;
template <> constexpr auto intsafe_conversion<long , unsigned short > = LongToUShort;
template <> constexpr auto intsafe_conversion<short , char > = ShortToChar;
template <> constexpr auto intsafe_conversion<short , signed char > = ShortToInt8;
template <> constexpr auto intsafe_conversion<short , unsigned __int64> = ShortToULongLong;
template <> constexpr auto intsafe_conversion<short , unsigned char > = ShortToUChar;
template <> constexpr auto intsafe_conversion<short , unsigned int > = ShortToUInt;
template <> constexpr auto intsafe_conversion<short , unsigned long > = ShortToULong;
template <> constexpr auto intsafe_conversion<short , unsigned short > = ShortToUShort;
template <> constexpr auto intsafe_conversion<signed char , unsigned __int64> = Int8ToULongLong;
template <> constexpr auto intsafe_conversion<signed char , unsigned char > = Int8ToUChar;
template <> constexpr auto intsafe_conversion<signed char , unsigned int > = Int8ToUInt;
template <> constexpr auto intsafe_conversion<signed char , unsigned long > = Int8ToULong;
template <> constexpr auto intsafe_conversion<signed char , unsigned short > = Int8ToUShort;
template <> constexpr auto intsafe_conversion<unsigned __int64, __int64> = ULongLongToLongLong;
template <> constexpr auto intsafe_conversion<unsigned __int64, char > = ULongLongToChar;
template <> constexpr auto intsafe_conversion<unsigned __int64, int > = ULongLongToInt;
template <> constexpr auto intsafe_conversion<unsigned __int64, long > = ULongLongToLong;
template <> constexpr auto intsafe_conversion<unsigned __int64, short > = ULongLongToShort;
template <> constexpr auto intsafe_conversion<unsigned __int64, signed char > = ULongLongToInt8;
template <> constexpr auto intsafe_conversion<unsigned __int64, unsigned char > = ULongLongToUChar;
template <> constexpr auto intsafe_conversion<unsigned __int64, unsigned int > = ULongLongToUInt;
template <> constexpr auto intsafe_conversion<unsigned __int64, unsigned long > = ULongLongToULong;
template <> constexpr auto intsafe_conversion<unsigned __int64, unsigned short > = ULongLongToUShort;
template <> constexpr auto intsafe_conversion<unsigned char , char > = UInt8ToChar;
template <> constexpr auto intsafe_conversion<unsigned char , signed char > = UIntToInt8;
template <> constexpr auto intsafe_conversion<unsigned int , char > = UIntToChar;
template <> constexpr auto intsafe_conversion<unsigned int , int > = UIntToInt;
template <> constexpr auto intsafe_conversion<unsigned int , long > = UIntToLong;
template <> constexpr auto intsafe_conversion<unsigned int , short > = UIntToShort;
template <> constexpr auto intsafe_conversion<unsigned int , signed char > = UIntToInt8;
template <> constexpr auto intsafe_conversion<unsigned int , unsigned char > = UIntToUChar;
template <> constexpr auto intsafe_conversion<unsigned int , unsigned short > = UIntToUShort;
template <> constexpr auto intsafe_conversion<unsigned long , char > = ULongToChar;
template <> constexpr auto intsafe_conversion<unsigned long , int > = ULongToInt;
template <> constexpr auto intsafe_conversion<unsigned long , long > = ULongToLong;
template <> constexpr auto intsafe_conversion<unsigned long , short > = ULongToShort;
template <> constexpr auto intsafe_conversion<unsigned long , signed char > = ULongToInt8;
template <> constexpr auto intsafe_conversion<unsigned long , unsigned char > = ULongToUChar;
template <> constexpr auto intsafe_conversion<unsigned long , unsigned int > = ULongToUInt;
template <> constexpr auto intsafe_conversion<unsigned long , unsigned short > = ULongToUShort;
template <> constexpr auto intsafe_conversion<unsigned short , char > = UShortToChar;
template <> constexpr auto intsafe_conversion<unsigned short , short > = UShortToShort;
template <> constexpr auto intsafe_conversion<unsigned short , signed char > = UShortToInt8;
template <> constexpr auto intsafe_conversion<unsigned short , unsigned char > = UShortToUChar;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<__int64, char > = LongLongToChar;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<__int64, int > = LongLongToInt;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<__int64, long > = LongLongToLong;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<__int64, short > = LongLongToShort;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<__int64, signed char > = LongLongToInt8;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<__int64, unsigned __int64> = LongLongToULongLong;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<__int64, unsigned char > = LongLongToUChar;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<__int64, unsigned int > = LongLongToUInt;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<__int64, unsigned long > = LongLongToULong;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<__int64, unsigned short > = LongLongToUShort;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<int , char > = IntToChar;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<int , short > = IntToShort;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<int , signed char > = IntToInt8;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<int , unsigned __int64> = IntToULongLong;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<int , unsigned char > = IntToUChar;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<int , unsigned int > = IntToUInt;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<int , unsigned long > = IntToULong;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<int , unsigned short > = IntToUShort;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<long , char > = LongToChar;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<long , int > = LongToInt;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<long , short > = LongToShort;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<long , signed char > = LongToInt8;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<long , unsigned __int64> = LongToULongLong;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<long , unsigned char > = LongToUChar;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<long , unsigned int > = LongToUInt;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<long , unsigned long > = LongToULong;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<long , unsigned short > = LongToUShort;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<short , char > = ShortToChar;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<short , signed char > = ShortToInt8;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<short , unsigned __int64> = ShortToULongLong;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<short , unsigned char > = ShortToUChar;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<short , unsigned int > = ShortToUInt;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<short , unsigned long > = ShortToULong;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<short , unsigned short > = ShortToUShort;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<signed char , unsigned __int64> = Int8ToULongLong;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<signed char , unsigned char > = Int8ToUChar;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<signed char , unsigned int > = Int8ToUInt;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<signed char , unsigned long > = Int8ToULong;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<signed char , unsigned short > = Int8ToUShort;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned __int64, __int64> = ULongLongToLongLong;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned __int64, char > = ULongLongToChar;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned __int64, int > = ULongLongToInt;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned __int64, long > = ULongLongToLong;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned __int64, short > = ULongLongToShort;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned __int64, signed char > = ULongLongToInt8;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned __int64, unsigned char > = ULongLongToUChar;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned __int64, unsigned int > = ULongLongToUInt;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned __int64, unsigned long > = ULongLongToULong;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned __int64, unsigned short > = ULongLongToUShort;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned char , char > = UInt8ToChar;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned char , signed char > = UIntToInt8;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned int , char > = UIntToChar;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned int , int > = UIntToInt;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned int , long > = UIntToLong;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned int , short > = UIntToShort;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned int , signed char > = UIntToInt8;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned int , unsigned char > = UIntToUChar;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned int , unsigned short > = UIntToUShort;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned long , char > = ULongToChar;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned long , int > = ULongToInt;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned long , long > = ULongToLong;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned long , short > = ULongToShort;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned long , signed char > = ULongToInt8;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned long , unsigned char > = ULongToUChar;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned long , unsigned int > = ULongToUInt;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned long , unsigned short > = ULongToUShort;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned short , char > = UShortToChar;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned short , short > = UShortToShort;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned short , signed char > = UShortToInt8;
template <> __WI_LIBCPP_INLINE_VAR constexpr auto intsafe_conversion<unsigned short , unsigned char > = UShortToUChar;
}
// Unsafe conversion where failure results in fail fast.
Expand Down