[func.bind.isplace] (original) (raw)

20 General utilities library [utilities]

20.14 Function objects [function.objects]

20.14.15 Function object binders [func.bind]

20.14.15.3 Class template is_­placeholder [func.bind.isplace]

namespace std { template<class T> struct is_placeholder; }

The class template is_­placeholder can be used to detect the standard placeholders_­1, _­2, and so on.

The function template bind usesis_­placeholder to detect placeholders.

Specializations of the is_­placeholder template shall meet the Cpp17UnaryTypeTrait requirements ([meta.rqmts]).

The implementation provides a definition that has the base characteristic ofintegral_­constant<int, J_> if T is the type ofstd​::​placeholders​::​_­_J, otherwise it has a base characteristic of integral_­constant<int, 0>.

A program may specialize this template for a program-defined type T to have a base characteristic of integral_­constant<int, N>with N > 0 to indicate that T should be treated as a placeholder type.