Extract non-portability constexpr math functions to new header
Summary: [Folly] Extract non-portability `constexpr` math functions to new header. This new header, `folly/ConstexprMath.h`, is specifically for compile-time-computable math functions. We start with `min`, `max`, `abs`, and `log2`. Included substantive changes: * Add new tests for `constexpr_strlen`, which remains in the portability header. * Make `constexpr_min` and `constexpr_max` variadic. * Make `constexpr_log2` tail-recursive, remove `const_log2` in `FixedString.h`, and move the related comment. Reviewed By: Orvid Differential Revision: D5739715 fbshipit-source-id: 29d3cc846ce98bb4bdddcc8b0fa80e4d32075fe0
Showing
folly/ConstexprMath.h
0 → 100644
Please register or sign in to comment