
27 May
2005
27 May
'05
10:12 a.m.
Peder Holt <peder.holt <at> gmail.com> writes:
On 5/27/05, Alexander Nasonov <alnsn-boost <at> yandex.ru> wrote:
Sizes may become very huge, though.
If you replace your function with: char (&foo())[900][800][700][600]; you will get an overflow when calculating e.g. sizeof(foo()) / sizeof(foo()[0]), and the result will be garbage.
That's right. Huge arrays can be replaced with tuples. tuple<char(&)[9], char(&)[8], char(&)[7], char(&)[6]> foo(); sizeof(get<0>(foo())); sizeof(get<1>(foo())); sizeof(get<2>(foo())); sizeof(get<3>(foo())); Not sure if it compiles with boost::tuple. -- Alexander Nasonov