|
Boost Users : |
Subject: Re: [Boost-users] boost variant question
From: petros (pmamales_at_[hidden])
Date: 2011-09-24 12:13:00
Hi Larry,
Thank you for the response.
As I said, this is only an example for the reason I am seeking this
functionality.
Best Regards,
Petros
-----Original Message-----
From: Larry Evans
Sent: Saturday, September 24, 2011 6:03 AM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] boost variant question
On 09/23/11 21:49, petros wrote:
> Hi,
> I am new to the boost variant and have the following issue.
> I have, two numeric vector-like structures (say a contiguous and a
> strided â the actual problem has many more),
> and would like to create a variant of those two to use interchangeably
> in my code.
> Then plan is to have different constructors for different hosted
> structures and play with deriving-from/containing a variant
> These structures, being stl-like have iterators.
> Is there a mechanism to export the iterator that corresponds to the
> structure hosted in the variant and use it?
> Would I have along-side a variant of the corresponding iterators â if
> this is possible at all?
> Is there a âpreferrably elegant, nut necessarily efficient- solution to
> this?
> Thank you in advance for your help,
> Kind Regards,
> Petros
>
Why wouldn't a boost::multi_array, a_multi_array, satisfy your
requirements? a_multi_array.data() would return the contiguous
vector-like structure, and a_multi_array itself would be the
strided vector-like structure.
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
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