TRIQS / triqs

a Toolbox for Research on Interacting Quantum Systems
https://triqs.github.io
GNU General Public License v3.0
141 stars 72 forks source link

Provide version integers for preprocessor checks #839

Closed hmenke closed 2 years ago

hmenke commented 2 years ago

To facilitate code like this

    auto const gf_struct = gf_struct_t{
#if TRIQS_VERSION_MINOR < 1
        {"up", {0,1,2}},
        {"dn", {0,1,2}}
#else
        {"up", 3},
        {"dn", 3}
#endif
    };

Maybe it's possible to backport this to the 3.0.x branch.