    #include <type_traits>

    template<typename T>
    struct identity { using type = T; };

    template<typename T>
    using try_make_signed =
        typename std::conditional<
            std::is_integral<T>::value,
            std::make_signed<T>,
            identity<T>
            >::type;

    int main()
    {
        static_assert(std::is_same<try_make_signed<unsigned int>::type, int>::value, "!");
        static_assert(std::is_same<try_make_signed<double>::type, double>::value, "!");
    }
