|
Boost Users : |
From: Doug Gregor (dgregor_at_[hidden])
Date: 2004-07-12 16:56:39
On Jul 12, 2004, at 4:17 PM, John.Wismar_at_[hidden] wrote:
> The objective would be to allow me to write a function template that
> looked
> something like this:
>
> template <int N>
> tuple_clone<int, N> fn(tuple_clone<int, N-1> t)
> {
> tuple_clone<int, N> ret;
> ret.get_head() = getValue();
> ret.get_tail() = t;
> return ret;
> }
>
> Each time I try to write tuple_clone, though, I end up stumped. Is it
> possible to write something like this, while leveraging the tuples
> library?
> Or is there a different approach I ought to look into?
Why is it that you can't use boost::array<int, N>, which has a more
convenient syntax when all of the values are of the same type?
Doug
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