Boost logo

Boost Users :

Subject: Re: [Boost-users] Boilerplate generated code
From: Dave Abrahams (dave_at_[hidden])
Date: 2010-09-03 21:24:26


On Fri, Sep 3, 2010 at 8:46 PM, Ryan McConnehey <mccorywork_at_[hidden]> wrote:
> I have a class that mostly remains the same except for the variables and
> functions to retrieve the variables.  I've looked at boost preprocessor and
> it seems more designed to create classes that have a fixed number of
> variables but different defaults.  Could any of the boost libraries turn the
> included class into boilerplate code that allows an arbitrary number of
> variables?  The example below only has three variables but I could have used
> any number.

<snip>

Your example looks like a perfect use for Boost.Preprocessor. Have
you read through http://www.boostpro.com/tmpbook/preprocessor.html ?

-- 
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