Boost logo

Boost :

Subject: Re: [boost] quince: queries in C++ expressions
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2014-07-15 08:15:50


On 15/07/14 08:04, Michael Shepanski wrote:

> 1. If you want some class to be mapped into SQL data, quince lets you
> write this sort of thing:
>
> struct point {
> float x;
> float y;
> };
> QUINCE_MAP_CLASS(point, (x)(y))
>
> extern database db;
> table<point> points(db, "points");
>
> The macro QUINCE_MAP_CLASS uses a bit of Boost.Preprocessor magic and a
> bit of template metaprogramming to produce all the statically typed
> metadata that quince needs, regarding the user's type. There is no code
> generation step.

There are already macros to do this in Boost Fusion.
Why not re-use them?

Boost.Fusion is a tuple manipulation library initially developed for a
parser generator EDSL.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk