bounded_buffer is taken from the boost circular_buffer examples which wraps
operations with lock acquisition and release (more type-safe).
I've changed up the calls slightly for my app and the problem is, I am
having
difficulty compiling. I was hoping to make the calls like below w/o the
need for a template function (as in the example) since I'm in the function
where I'd like to make the calls.
---
bounded_buffer<MyData> bb(200);
Consumer consumer(bb);
Producer producer(bb);
boost::thread* c_thread = new boost::thread(consumer);
boost::thread* p_thread = new boost::thread(producer);
threads.add_thread(c_thread);
threads.add_thread(p_thread);
---
Here are the compile errors:
error: type/value mismatch at argument 1 in template parameter list for
'template<class Buffer> class Consumer'
error: expected a type, got 'bounded_buffer'
The example code I'm using is,
http://www.boost.org/doc/libs/1_55_0/libs/circular_buffer/example/circular_b...