Questions tagged [boost-bind]

boost::bind is a generalization of the standard C++ functions std::bind1st and std::bind2nd. It supports arbitrary function objects, functions, function pointers, and member function pointers, and is able to bind any argument to a specific value or route input arguments into arbitrary positions.

boost::bind is a generalization of the standard C++ functions std::bind1st and std::bind2nd. It supports arbitrary function objects, functions, function pointers, and member function pointers, and is able to bind any argument to a specific value or route input arguments into arbitrary positions. bind does not place any requirements on the function object; in particular, it does not need the result_type, first_argument_type and second_argument_type standard typedefs.

boost::bind was proposed for standardization and a version of it was included in as std::tr1::bind and an improved version is included in the standard as std::bind (see ).

352 questions
0
votes
3 answers

double boost::bind cause compile-time error

The following code give compile error caused by line 17: #include #include void func() {} class A{ public: template static void foo(T const& arg){} template void…
John Crane
  • 371
  • 5
  • 14
-1
votes
1 answer

max size of buffer of boost::bind function

i have a question about maximum size of buffer in handler function which is called in boost::bind method. I have a tcp socket client: chat_client(boost::asio::io_service& io_service, tcp::resolver::iterator endpoint_iterator) :…
-1
votes
1 answer

Boost.Bind and template member function

I have a function Change that takes two parameters in an template class as such. The boost::bind gives an error error: invalid use of non-static member function #include #include #include enum class EventType { …
Ivan
  • 7,448
  • 14
  • 69
  • 134
-1
votes
3 answers

Why does this boost bind non-static member function fail?

Why does the following compiles i.e. passing a free function as parameter with the right signature: inline double free_adapter_f(unsigned n, const double *x, double *grad, void *d) { return 0.0; } nlopt::opt opt(nlopt::LN_NELDERMEAD,…
SkyWalker
  • 13,729
  • 18
  • 91
  • 187
-1
votes
1 answer

How to use boost::bind with "this" pointer?

The code below is outputting the following error : error C2663: 'boost::signal0::connect' : 2 overloads have no legal conversion for 'this' pointer with [ R=void, …
peterphonic
  • 951
  • 1
  • 19
  • 38
-1
votes
1 answer

Generic function bind() with Boost

I have some C-style functions that return 0 to indicate success, and != 0 on error. I'd like to "wrap" them into void functions that throw instead of returning a value. I have written this helper: void checkStatus(int status) { if (status != 0) …
Alba Mendez
  • 4,432
  • 1
  • 39
  • 55
-2
votes
2 answers

when launching boost::thread the .exe chrashes

This is my function: void cmdChangeSett(cmdbuf* cmd_buffer, CTimeTag tagger, uint8_t chNum, int mask) { double* oldChannelvoltage = new double[chNum]; double* newChannelvoltage = new double[chNum]; bool* oldEdge = new bool[chNum]; bool* newEdge =…
cala
  • 1
  • 2
1 2 3
23
24