Boost logo

Boost :

From: Tianjiao Yin (ytj000_at_[hidden])
Date: 2019-12-02 19:19:04


Hi there,

Is there any interest in library that makes template programming
imperative. Basically it provides following API

    VAR(T); // define a variable T
    SET(T, Type1); // Assign T = Type1
    GET(T); // This macro will be expanded to Type1
    SET(T, Type2); // Re-assign T = Type2
    GET(T); // This macro will be expanded to Type2

The same idea applies to constexpr variable as well. I.e. it's possible
to re-define constexpr variable after initialization, though this
functionality is not implemented yet.

- Github: https://github.com/Mizuchi/tm
- Try it online: https://godbolt.org/z/yfQb4K

Thanks,
Tianjiao


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