embxx
embxx copied to clipboard
Trying to compile the StaticQueue in STM32cubeIde (arm-none-eabi) throws an error
... template <typename T> class StaticQueueBase<T>::ConstIterator : public StaticQueueBase<T>::template IteratorBase<typename StaticQueueBase<T>::ConstIterator, const StaticQueueBase<T> > { ... template <typename T> class StaticQueueBase<T>::Iterator : public StaticQueueBase<T>::template IteratorBase<typename StaticQueueBase<T>::Iterator, StaticQueueBase<T> > { ...
throws an error "expected class-name before '{' token".
- Insufficient information is provided to help identify the problem.
- This library was developed more than 10 years ago with older compilers and is not really maintained.
It is about this line https://github.com/arobenko/embxx/blob/edd548239a10bb7c8fda32ddb445305289bfe805/embxx/container/StaticQueue.h#L1166 and this https://github.com/arobenko/embxx/blob/edd548239a10bb7c8fda32ddb445305289bfe805/embxx/container/StaticQueue.h#L1188
Without seeing full errors dump I'm not sure what you compiler dislikes.
Try adding typename between public and StaticQueueBase<T>.
class StaticQueueBase<T>::ConstIterator :
public typename StaticQueueBase<T>::template
IteratorBase<typename StaticQueueBase<T>::ConstIterator, const StaticQueueBase<T> >