On Fri, Jun 19, 2015 at 2:40 AM, Mathias Gaunard < mathias.gaunard@ens-lyon.org> wrote:
What template meta-programming were you able to replace by constexpr?
As far as I'm concerned, I've yet to see a use case where constexpr is anything but an optimization hint.
All of the calculation for new bounds of my bounded::integer library use constexpr computation. The result of these constexpr computations will be used as template parameters (so the value computations in my constexpr functions will be used to determine a template type). The entire contents of https://bitbucket.org/davidstone/bounded_integer/src/51e8369077e4765136e0718... show this, especially https://bitbucket.org/davidstone/bounded_integer/src/51e8369077e4765136e0718... What I am currently working on with this will make it especially difficult to replace this with non-type template parameters for a more C++03 metaprogramming style, because the template parameters to my constexpr functions will themselves be bounded::integer types, which are not allowed as non-type template parameters.