Thread overview
type qualifiers and static can only appear in outermost array of function parameter
Mar 12, 2004
Paul Runde
Mar 18, 2004
Matthew
Mar 19, 2004
Paul Runde
March 12, 2004
This works with gcc

template<class T>
class foo
{
    void dothis(const T&);
};

template<class T> inline void foo<T>::dothis(const T& x)
{
}

foo<char[2048]> foostr;  //generates the error


Thanks,

Paul
March 18, 2004
It looks like a bug, but does a typedef suffice as a workaround?

"Paul Runde" <prunde@consolidated.net> wrote in message news:c2t70v$28t7$1@digitaldaemon.com...
> This works with gcc
>
> template<class T>
> class foo
> {
>      void dothis(const T&);
> };
>
> template<class T> inline void foo<T>::dothis(const T& x)
> {
> }
>
> foo<char[2048]> foostr;  //generates the error
>
>
> Thanks,
>
> Paul



March 19, 2004
typedef works as such:

typedef char c_t[2048];

foo<c_t*> foostr;

gcc accepts this.

Matthew wrote:
> It looks like a bug, but does a typedef suffice as a workaround?
> 
> "Paul Runde" <prunde@consolidated.net> wrote in message
> news:c2t70v$28t7$1@digitaldaemon.com...
> 
>>This works with gcc
>>
>>template<class T>
>>class foo
>>{
>>     void dothis(const T&);
>>};
>>
>>template<class T> inline void foo<T>::dothis(const T& x)
>>{
>>}
>>
>>foo<char[2048]> foostr;  //generates the error
>>
>>
>>Thanks,
>>
>>Paul
> 
> 
> 
>