I was researching what std::bind
is and what it's for (that may eventually be a different question) at MSDN: http://msdn.microsoft.com/en-us/library/bb982702.aspx
And saw that the prototypes listed are:
template<class Fty, class T1, class T2, ..., class TN>
unspecified bind(Fty fn, T1 t1, T2 t2, ..., TN tN);
template<class Ret, class Fty, class T1, class T2, ..., class TN>
unspecified bind(Fty fn, T1 t1, T2 t2, ..., TN tN);
Which confuses me for two reasons. 1) Last I checked, MSVC didn't implement variadic templates, and 2) My question: what does the word unspecified
mean there? (It doesn't seem related to unspecified behavior.)
The unspecified in the return type means that it is a type that is, well, unspecified. The standard does not require a particular type to be returned from
bind
, as long as the returned type complies with the requirements that the standard mandates.As of the
...
, I don't know whether VS implements them or not, but you will see the same documentation forboost::bind
, and it has been compiling in different compilers without variadic template support for some time already... the documentation states that you can passN
arguments of different types, but that does not necessarily mean that there is a single template that does it, it can be implemented in terms of a set of 1-ary, 2-ary... N-ary templates.The documentation is showing the behavior that you can expect from using it, rather than the detail of how it is implemented.