www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - type qualifiers and static can only appear in outermost array of

↑ ↓ ← Paul Runde <prunde consolidated.net> writes:
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
Mar 12 2004
↑ ↓ "Matthew" <matthew stlsoft.org> writes:
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

Mar 18 2004
↑ ↓ → Paul Runde <prunde consolidated.net> writes:
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


Mar 18 2004