
27 May
2005
27 May
'05
noon
Alexander Nasonov wrote:
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.
There is also a tuple implementation in Fusion as a part of Boost.Spirit which sould compile no problem (with the appropriate headers included): #include <boost/spirit/fusion/sequence/tuple.hpp> #include <boost/spirit/fusion/sequence/get.hpp> using namespace boost::fusion; Reece Haston Dunn Software Engineer, Sophos Web: www.sophos.com Sophos - protecting businesses against viruses and spam