Boost logo

Boost :

From: Alexander Nasonov (alnsn-boost_at_[hidden])
Date: 2005-05-27 05:12:18

Peder Holt <peder.holt <at>> writes:

> On 5/27/05, Alexander Nasonov <alnsn-boost <at>> 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();


Not sure if it compiles with boost::tuple.

Alexander Nasonov

Boost list run by bdawes at, gregod at, cpdaniel at, john at