types/traits: add try_signed_t

This commit is contained in:
Danny Robson 2019-08-09 11:39:58 +10:00
parent a47d8602bd
commit 2f28e5caa6

View File

@ -115,6 +115,11 @@ template <> struct try_signed<double> { typedef double type; };
template <> struct try_signed<float > { typedef float type; };
//-----------------------------------------------------------------------------
template <typename ValueT>
using try_signed_t = typename try_signed<ValueT>::type;
///////////////////////////////////////////////////////////////////////////////
/// checks if a type can be converted in all cases without modification
template <typename T, typename U> struct is_lossless_cast : std::enable_if<