Fix constexpr_min after D5739715 v2017.09.04.00
authorYedidya Feldblum <yfeldblum@fb.com>
Sat, 2 Sep 2017 09:11:34 +0000 (02:11 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 2 Sep 2017 09:20:18 +0000 (02:20 -0700)
commit4fd5e900005f59337d3b22f3ec8ef6b182486d81
treebc70621963677bb047e74d553a82ba47c2bfac8c
parent555494f0af80e57630592b1829f5899507657438
Fix constexpr_min after D5739715

Summary:
[Folly] Fix `constexpr_min` after {D5739715} (facebook/folly@6d7c6d55f0f4b7b75607608ef9037db58083368f).

Add new unit-tests for `constexpr_min` and `constexpr_max` to avoid silly mistakes like this in the future.

It was defined recursively in terms of `constexpr_max` rather than, as intended, in terns of `constexpr_min`. HT Mandar12.

Reviewed By: Orvid

Differential Revision: D5761831

fbshipit-source-id: 2dad5833e05679232b3c529d33325a0205c2e4e4
folly/ConstexprMath.h
folly/test/ConstexprMathTest.cpp