You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
groupByLayout turns out to be extraordinarily difficult to port to C++. I've considered three different approaches:
Grouping using an unordered_map or unordered_multiset. This requires implementing a hash function for Layer, Filter, LayoutProperties, PropertyValue, Function, and all types used by those types. I got deep into the weeds of trying to make std::hash and boost::hash cooperate before abandoning this approach.
Grouping using a map or multiset. This requires implementing a less than operator for Layer, Filter, LayoutProperties, PropertyValue, Function, and all types used by those types. This seems easier until you discover that unordered_map (used by mapbox::geometry::value, which is used by Filter) doesn't provide a less than operator.
Following the JS implementation exactly, and implementing (stable) JSON stringify for all these types. This seems equally if not more daunting than either of the above.
Activity
jfirebaugh commentedon Dec 23, 2016
groupByLayoutturns out to be extraordinarily difficult to port to C++. I've considered three different approaches:unordered_maporunordered_multiset. This requires implementing a hash function forLayer,Filter,LayoutProperties,PropertyValue,Function, and all types used by those types. I got deep into the weeds of trying to makestd::hashandboost::hashcooperate before abandoning this approach.mapormultiset. This requires implementing a less than operator forLayer,Filter,LayoutProperties,PropertyValue,Function, and all types used by those types. This seems easier until you discover thatunordered_map(used by mapbox::geometry::value, which is used byFilter) doesn't provide a less than operator.