0

I am trying to pass boost::circular_buffer::iterator as a function argument to iterate over the circular buffer. This is the prototype definition of a function in a header file inside the project that I am working on

#include<boost/circular_buffer.hpp>
#include <boost/assert.hpp>
#include <boost/iterator.hpp>

#ifndef STEREOMATCH_H_
#define STEREOMATCH_H_
template <class T, class U>
class StereoMatch {

public:

void fillPixels(boost::circular_buffer<T>::iterator it, T* imgPtr,const int BUFF_SIZE);
};


#endif /* STEREOMATCH_H_ */

When I build the project, I get the following error

In file included from ../depth/StereoMatch.cpp:7:0:
../depth/StereoMatch.h:33:45: error: 'boost::circular_buffer<T, std::allocator<_Tp1> >::iterator' is not a type

What sould I do to resolve this error ?

Taki Eddine
  • 33
  • 1
  • 5
  • 1
    Does it work if you add `typename ` before `boost`? – user253751 Dec 18 '19 at 17:56
  • See [Where and why do I have to put the “template” and “typename” keywords?](https://stackoverflow.com/questions/610245/where-and-why-do-i-have-to-put-the-template-and-typename-keywords) – walnut Dec 18 '19 at 18:21
  • @user253751 I did what you suggested, and I still get the same error. – Taki Eddine Dec 19 '19 at 11:32

0 Answers0