error: type/value mismatch at argument 1 in template parameter
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<bounded_buffer> consumer(bb); Producer<bounded_buffer> 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...
Hi, this might be a silly question, but did you try to instantiate Consumer<bounded_buffer> consumer(bb); // passing incomplete type as you wrote, or did you specify the concrete type Consumer<bounded_buffer<MyData> > consumer(bb); ? Best, Andreas
participants (2)
-
Andreas Hehn
-
Lane