Boost logo

Boost Users :

Subject: Re: [Boost-users] [MPL] return type
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-10-11 08:39:54


on Tue Oct 11 2011, Istvan Buki <buki.istvan-AT-gmail.com> wrote:

> Thank you for your suggestions.
>
> It seems that one way or the other I'll have to bite the bullet and
> use (at least partially) a more traditional approach in my
> application. It all started when I saw that to avoid duplicating
> information among my classes I created a complex inheritance
> hierarchy. I didn't like it and I decided to try using some
> generative programming techniques to build my classes at
> compile-time. So far so good but then I was facing all kind of other
> problems like how to store these heterogeneous objects in containers
> or, like in the example above, mix run-time and compile-time tests...

Well, boost::variant is very well-suited to these problems.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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