Questions tagged [bind2nd]

The deprecated C++ function template std::bind2nd() generates an unary function object from a binary function object by fixing the second parameter.

std::bind2nd is (as part of the standard, INCITS/ISO/IEC 14882-2011) a deprecated function template in the C++ general utilities library (function objects; header <functional>).

It can (but should -in C++11- no longer) be used to perform Partial function application by creating an unary function object from a binary function object by binding the second parameter to a certain value.

In C++11, it's functionality can be shaped with the help of std::bind / instead.

17 questions
0
votes
2 answers

Bind2nd issue with user-defined class

I'm trying to learn how to use bind2nd with user-defined classes, but I'm getting an error that I can't figure out how to fix despite my efforts of looking into other resources for assistance. Help would be appreciated, thank you. main.cpp #include…
Tundra Fizz
  • 473
  • 3
  • 10
  • 25
-2
votes
2 answers

Explain the code?

I came across this code. From the output I could infer that remainder array stores the remainder of numbers array when divided by 2. But the syntax is unfamiliar to me. #include #include #include using namespace…
Akriti Anand
  • 166
  • 3
  • 17
1
2