Boost logo

Boost :

From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2020-09-30 08:41:25


We've been using PFR on a huge codebase for two years now. In many cases
it's functionality is enough. For example, we're using PFR to get data from
database:

struct OrderInfo{unsigned id; string client, merchant; decimal price; };

auto order = db.Execute(statement).As<OrderInfo>();

Some other usecases for PFR:
* SPIRIT like parsers - parsing directly into the user provided structure
* Binary serializers and readers - to easily store/retrieve data from a
local file
* Generic code - move users from tuple and pair to aggregates to improve
code readability and performance

On Wed, Sep 30, 2020, 10:43 Andrzej Krzemienski <akrzemi1_at_[hidden]> wrote:

...
My ideal solution would be if these two libraries (PFR and Describe) would
be merged into one, so that:
1. They provide the same interface
2. A user can easily instruct the library: "this is an aggregate: figure
out the mapping yourself".

I'm in favour of ideal solution, but that should be separate from PFR.
There's quite a lot of projects where codegen is used instead of macro
registration, and for those projects PFR is fine but Describe is doubtful
(even though it is better that many inhouse codegen solutions).

>


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