Improve string comparisons
authorPhil Willoughby <philwill@fb.com>
Wed, 19 Apr 2017 12:34:26 +0000 (05:34 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 19 Apr 2017 12:36:48 +0000 (05:36 -0700)
commit5a122efcd603512292bd09b541c212773d2b7d55
treeb2a4d58c0352d459fe6821a5db18851a100cf901
parent14c1d806143613b2203609531054d1244c277dcc
Improve string comparisons

Summary:
Any pair of read-compatible (same type, same traits) basic_strings (`basic_fbstring` or `std::basic_string`) can now be compared to each other with the `==`, `!=`, `<`, `>`, `<=`, and `>=` operators.

If you have a C++14 environment this allows you to use the heterogeneous comparison lookup methods from N3657: you can query containers which store either string type with either string type efficiently.

Reviewed By: yfeldblum, ot

Differential Revision: D4905697

fbshipit-source-id: 2ea976ebf40af45d64c1d8c1c08847feb3b9db68
folly/FBString.h
folly/test/FBStringTest.cpp