dimanche 8 mai 2022

how is std::is_function implemented

Per CPP reference, std::is_function can be implemented as follows. Can someone explain why this works as it seemingly does not directly address callables?

template<class T>
struct is_function : std::integral_constant<
    bool,
    !std::is_const<const T>::value && !std::is_reference<T>::value
> {};

Aucun commentaire:

Enregistrer un commentaire