|
Boost : |
From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-05-27 07:00:39
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk