> On Jun 25, 2015, at 5:20 PM, Ben Goodrich <
goodri...@gmail.com> wrote:
>
> On Thursday, June 25, 2015 at 5:27:54 AM UTC-4, Michael Betancourt wrote:
> Is there a pattern that would allow us to implement dynamic return types?
> I can imagine metaprograms that properly map a block of vector data
> in the var_context into the appropriate output (instead of having a dims
> vector we’d have a type class which would not only contain the dim
> information but also the type information) but I don’t see how we could
> get dynamic return types with a single function signature.
>
> Assuming C++11 in the future, we could store output in an Eigen::Tensor
I don't think we can assume C++11. We have too many legacy compilers
and systems like R that won't work with C++11 yet, so we're
going to trash a whole bunch of users if we assume C++11 any
time soon (by which I mean in the next year or more).
We don't need Eigen tensors, though --- we can just use something
like Boost arrays if we really need more generality.
- Bob