C++是否保证std::placeholders::_N的最小数量?
Does C++ guarantee the minimum number of std::placeholders::_N?
根据cppref:
The std::placeholders
namespace contains the placeholder objects [_1, . . . _N]
where N
is an implementation defined maximum number.
我只是想知道:
C++是否保证的最小数 std::placeholders::_N
?
不,不保证占位符的最小数量。 [func.bind.place] 明确指出该数字为“实现定义的占位符数”。
但是,您可能会访问 10 个不同的占位符,如 [implimits] 所说:
The bracketed number following each quantity is recommended as the minimum for that quantity. However, these quantities are only guidelines and do not determine compliance.
Number of placeholders ([func.bind.place]) [10].
根据cppref:
The
std::placeholders
namespace contains the placeholder objects[_1, . . . _N]
whereN
is an implementation defined maximum number.
我只是想知道:
C++是否保证的最小数 std::placeholders::_N
?
不,不保证占位符的最小数量。 [func.bind.place] 明确指出该数字为“实现定义的占位符数”。
但是,您可能会访问 10 个不同的占位符,如 [implimits] 所说:
The bracketed number following each quantity is recommended as the minimum for that quantity. However, these quantities are only guidelines and do not determine compliance.
Number of placeholders ([func.bind.place]) [10].