Thread overview | |||||
---|---|---|---|---|---|
|
March 12, 2004 type qualifiers and static can only appear in outermost array of function parameter | ||||
---|---|---|---|---|
| ||||
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 Re: type qualifiers and static can only appear in outermost array of function parameter | ||||
---|---|---|---|---|
| ||||
Posted in reply to Paul Runde | 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 Re: type qualifiers and static can only appear in outermost array of function parameter | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew | 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
>
>
>
>
|
Copyright © 1999-2021 by the D Language Foundation