template matching variable size array
Jim Wilson
wilson@specifixinc.com
Fri May 14 01:11:00 GMT 2004
Neal D. Becker wrote:
g++34 supports variable size arrays.
There is some support, but it was never really designed. No thought was
given to how they interact with other C++ language features. As such,
you should not expect that variable size arrays will work with all C++
features, or that they will even work at all. It is probably safe if
you stick with very simple constructs, but anything complicated is
probably risky.
It is also possible that the feature will be removed or modified in
future g++ releases. VLAs were added to ISO C99, and they are different
than the old gcc dynamic arrays. I think we still have a mixture of
dynamic array and VLA support in the C front end. It is possible that
VLAs will be added to a future ISO C++ standard, and when that happens,
they will probably not be the same as the VLA support currently in the
C++ front end. In which case g++ will be modified to match the standard.
Disclaimer: I am not a C++ expert.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
More information about the Gcc
mailing list