[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: C++ Template Question
From:       Olivier Goffart <ogoffart () kde ! org>
Date:       2007-08-22 22:24:11
Message-ID: 200708230024.20346.ogoffart () kde ! org
[Download RAW message or body]


Le lundi 20 août 2007, Mosfet a écrit :
> http://doc.trolltech.com/4.3/qvarlengtharray.html

btw...


 int myfunc(int n)
 {
     int table[n + 1];  // WRONG
     ...
     return table[n];
 }

This works fine with GCC (unless you use --pedantic)
It's a nice gnu extention.
Does it works with others compiler supported by KDE?

Or is there a compiler supported by KDE which doesn't support it? If no, then 
we could use that.  Would it be possible to have some macro which allow 
arrays dynamically on the stack if the compiler is GCC, and use 
QVarLengthArray otherwise? Would that be worth?



["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic