Boost logo

Boost Users :

Subject: [Boost-users] error: type/value mismatch at argument 1 in template parameter
From: Lane (software.research.development_at_[hidden])
Date: 2015-05-05 22:43:24


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_buffer_bound_example.cpp


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net