|
Boost Users : |
From: Barak Simon (barak.simon_at_[hidden])
Date: 2004-09-22 04:29:19
Hi,
I am trying to use the Tuple library in order to provide a logging interface which can get
a variable number of parameters and handle them in a type-safe manner.
However, though constructing a tuple by make_tuple seems easy enough (from a logging's user point of view)
implementation wise, I am not sure how to actually iterate on the make_tuple_mapper which is being provided to my logging method, as
generically getting the length and using invoking "get" on it does not work due to compile-time reasons (and there are no iterators available).
I am sure it must be possible to do it somehow, or else the ostream serialisation capabilities would not have been possible to implement,
but I guess I am just not sophisticated enough to fully grasp the MP intricacies...
My logging method currently looks like that:
template<class TheTuple>
inline void logTuple(TheTuple theTuple)
{
}
which might not be the correct way about it, but I was not sure how to explicitly provide a tuple type that's created by make_tuple,
let alone how to iterate on the values.
Any help with this would be greatly appreciated.
Thanks,
Barak
_________________
Barak Simon
GED IT Core Platform
Deutsche Bank
190 George St. Sydney, 2000
Phone +61 2 925 85070
Fax +61 2 925 95050
-- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net