http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50257
--- Comment #16 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-06 16:37:55 UTC --- If you could have available a complete constexpr implementation of lower_bound, it would make in principle possible to optimize to a constant all the cases when it's called from a _M_next_bkt in turn called with constant argument, like the default constructor or the move constructor, or the constructor taking a size known at compile-time (Note the *in principle*, see c++/50087). All in all, seems a bit overkilling to me, considering the memory allocation which immediately follows. Also, the optimizers may well at some point become able to do a lot of this anyway via interprocedural constant propagation and versioning, because the information is all there: as soon as something is constant at compile-time it "just" needs to be thoroughly propagated.