Boost logo

Boost :

From: Benedek Thaler (thalerbenedek_at_[hidden])
Date: 2020-09-22 11:14:09


The Boost formal review of the FPR (Flat Precise Reflection, ex Magic
Get, ex PODs Flat Reflection) will take place from September 28, 2020
to October 7, 2020.

The library is meant for accessing structure elements by index and
providing other std::tuple like methods for user defined types without
any macro or boilerplate code.

The library is authored by Antony Polukhin, author of Boost.DLL,
Stacktrace, Type Index libraries.

Documentation: http://apolukhin.github.io/magic_get/
Source: https://github.com/apolukhin/magic_get

If the description isn't immediately obvious for you, here's a
motivating example:

// requires: C++14
#include <iostream>
#include <string>
#include "boost/pfr/precise.hpp"

struct some_person {
    std::string name;
    unsigned birth_year;
};

int main() {
    some_person val{"Edgar Allan Poe", 1809};

    std::cout << boost::pfr::get<0>(val) // No macro!
        << " was born in " << boost::pfr::get<1>(val); // Works with
any aggregate initializables!
}

See more at: https://github.com/apolukhin/magic_get/blob/develop/README.md

Benedek


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