http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50257
--- Comment #10 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-06 09:14:40 UTC --- Unfortunately constexpr functions are not going to help here, because of course a call of such a function is never optimized to a constant unless *the arguments* are all compile-time constants. In the meanwhile I timed my last patchlet and definitely isn't worse than the other for the simple testcase we have, otherwise I think it's much superior from any other point of view (besides maybe readability but actually I'm using a rather common pattern), thus for now I guess I'm going ahead with it. Thanks again.