Heterogeneous comparisons
authorNick Terrell <terrelln@fb.com>
Wed, 24 May 2017 02:35:39 +0000 (19:35 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 24 May 2017 02:53:36 +0000 (19:53 -0700)
commit8bca2fb294ee888e2c9b73123205868c0c947a51
tree3512eb4c25bd16f400fd0a5a15d634628fcef57f
parent790b68acacebb628f9552b1c20fbafa4962aebb7
Heterogeneous comparisons

Summary:
`std::optional` allows heterogeneous comparisons, so `folly::Optional` should as well.
This allows numerical comparisons between different types, like `size_t` and `uint64_t`.

Fixes https://github.com/facebook/folly/issues/602.

Reviewed By: AsyncDBConnMarkedDownDBException

Differential Revision: D5110651

fbshipit-source-id: 34f3368283953033fbb2423ab30b04e38b5b7974
folly/Optional.h
folly/test/OptionalTest.cpp