#include <type_traits>

template <typename T, typename ...Ts>
struct is_first_arg_const_ptr
{
    template <typename Ret>
    static std::false_type
    is_const(Ret (&f)(T*, Ts...));

    template <typename Ret>
    static std::true_type
    is_const(Ret (&f)(const T*, Ts...));
};

class C {};

void fun2(C*) {}
void fun2(const C*, int) {}

static_assert(!decltype(is_first_arg_const_ptr<C>::is_const(fun2))::value, "");
static_assert(decltype(is_first_arg_const_ptr<C, int>::is_const(fun2))::value, "");

int main ()
{
    return 0;
}
