* Remove last traces of Objective-C from document_key.h
* Generalize empty base optimization into CompressedMember
Remove ComparatorHolder.
* Add Comparator<T>.Compare
This makes C++ more like the other platforms, where three-way comparison
is the default.
For now, don't remove the less-than definition of operator()--this
allows these comparators to be used in both circumstances.
* Remove KeyComparator
With the transition between less-than and three-way comparison adapting
this class isn't worth it.
While technically this is losing use of std::lower_bound, the
performance cost is negligible because these arrays are guaranteed to be
always small. This also makes ArraySortedMap work more like it does in
the other ports.
* Add Compare to the remaining Comparators
* Migrate remaining comparator usage in immuntable to three-way
* Use absl::bit_cast in comparison
* Make Comparable depend upon CompareTo.
* Use Comparable in more places
* Remove Comparator::operator()
* Move things around in comparison.h
Move:
* Objective-C ComparisonResult functions nearer to others
* DefaultComparator to above the first specializations
* Make Comparison on by default, delegating to CompareTo if available
* Move NSString Comparator into comparison.h
* Remove no longer required Comparator classes
* Make FieldValue support Comparable
use namespace aliases instead.
This makes the Objective-C code much more like what it's going to end up
being like when translated to C++: headers will include classes declared
in a namespace relative to firebase::firestore so everything else will
be named relative to firebase::firestore.
Meanwhile the using statements in the headers were causing us to miss
adding using statements in source files which was moving us away from
where we wanted to be.
Also eliminate most usages of `FSTDocumentKey`, remove most methods from the Objective-C class and make it just a wrapper over `DocumentKey`. The only usage that cannot be directly replaced by C++ `DocumentKey` is in `FSTFieldValue`.
* lint.sh now lints Objective-C++ too
* cpplint checks system-style includes that should be user-style
This prevents it from recognizing project sources as if they were C
system headers and then complaining that they're in the wrong place.
* cpplint checks #imports and #includes
* cpplint checks that C++ system headers aren't #imported
* cpplint checks for C system headers that could be C++ system headers
* cpplint checks that Objective-C sources include their headers