bind1st in VS 2017

Category: visual studio vclanguage

Question

Geoyar on Tue, 06 Nov 2018 20:06:14


Hi

It is VS 2017 Community 15.8.9 under Windows 7 Pro SP1.

The project toolset is v141. The same is for v140 (VS15).

My compiler does not recognize the std::bind1st function. The Help says that this function is in header <functional>.

But search in the header for 'bind1st' (and 'bind2nd', too) returns no result. Only function 'bind' is present.

How to correct it?

Replies

Viorel_ on Tue, 06 Nov 2018 20:20:38


According to newer articles, bind1st is deprecated and removed.

Consider lambda expressions or bind.

Show an example if the modern approach does not work.