Boost logo

Boost Users :

Subject: Re: [Boost-users] Metaprogramming + Multiple Inheritance?
From: Hossein Haeri (powerprogman_at_[hidden])
Date: 2011-09-04 19:07:22

Hi Dave,
There is a fine line between Generic Programming in general and metaprogramming. My personal feeling is that Andrei's works -- and PBD in general -- are good instances for Generic Programming. Yet, I don't seem to register them per se as metaprogramming. I understand that this might be a very personal viewpoint. I say this because I had a try and couldn't quite put my reasons into words. Anyhow, thank you for reminding me of Andrei's Visitor implementations. Other examples (outside his book)?

--- On Sun, 4/9/11, Dave Abrahams <dave_at_[hidden]> wrote:

From: Dave Abrahams <dave_at_[hidden]>
Subject: Re: [Boost-users] Metaprogramming + Multiple Inheritance?
To: boost-users_at_[hidden]
Date: Sunday, 4 September, 2011, 22:05

on Sun Sep 04 2011, Hossein Haeri <> wrote:

> Dear all,
> I am looking for problems a reasonable design for solving which
> requires mixing (template/preprocessor) metaprogramming and multiple
> inheritance, say for a single class. In particular, has any part of
> the Boost library been designed with this mixture?
> TIA,--Hossein

The classic example is the implementation of a visitor.  See
Alexandrescu's "Modern C++ Design" for an extensive discussion.

Dave Abrahams
BoostPro Computing
Boost-users mailing list

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at