allow comparing Optional<T> with none
authorNick Wolchko <nwolchko@fb.com>
Mon, 14 Aug 2017 19:49:06 +0000 (12:49 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 14 Aug 2017 19:51:29 +0000 (12:51 -0700)
commit23de25b883ac689625ace272d9d3136a2fc4a375
tree97e933129aa7419c0fadc279c71c5704b2d4f46b
parent7289b921441f3f809b1c65bfd45750277c41afe5
allow comparing Optional<T> with none

Summary:
`std::optional` supports comparing with `std::nullopt`, so
`folly::Optional` should do the same with `folly::none`.
This also involves marking hasValue() noexcept to be the same as `std::optional`.

Reviewed By: yfeldblum, WillerZ

Differential Revision: D5617825

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