Files
2025-10-25 03:02:53 +03:00

1.6 KiB
Raw Permalink Blame History

[func.bind.isplace]

22 General utilities library [utilities]

22.10 Function objects [function.objects]

22.10.15 Function object binders [func.bind]

22.10.15.3 Class template is_placeholder [func.bind.isplace]

🔗

namespace std {template struct is_placeholder; // see below}

1

#

The class template is_placeholder can be used to detect the standard placeholders_1, _2, and so on ([func.bind.place]).

The function template bind usesis_placeholder to detect placeholders.

2

#

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.