Opened 11 years ago

Last modified 9 years ago

#6747 closed Bugs

Circular_Buffer / Bounded_Buffer inside Template class problem — at Version 3

Reported by: Koutsunis Prater <Koutsunis.Prater@…> Owned by: Jan Gaspar
Milestone: To Be Determined Component: circular_buffer
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc:

Description (last modified by viboes)

I am trying to create an instance of:

circular_buffer<ARRAY_TYPE> buffer (ARRAY_LENGTH);

inside of the following class:

template <class ARRAY_TYPE, unsigned int ARRAY_LENGTH>
class SmartArray
{
private:

but I keep getting:

error C2061: syntax error : identifier "ARRAY_LENGTH"
see reference to class template instantiation 'SmartArray<ARRAY...etc'

leaving off the (ARRAY_LENGTH) or doing something like (decltype(ARRAY_LENGTH)) stops this error but just causes other errors

Change History (3)

comment:1 by viboes, 10 years ago

Component: Nonecircular_buffer
Owner: set to Jan Gaspar

comment:2 by anonymous, 10 years ago

Not sure this is a circular_buffer bug. Does it work if you substitute circular_buffer with std::vector?

comment:3 by viboes, 9 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.