Open joka921 opened 3 weeks ago
Definitely on my radar but it's a larger refactoring than just the open source because we have many internal clients that would have to be ported, and it's never been a high enough priority to do it.
We'll fix this ourselves.
Currently, the
S2
library is not wrapped in a namespace. Additionally, most of the class names contain "S2" somewhere in their name, but not all of them. In particular, there are types calledDecoder
andEncoder
in the public namespace defined inutil/coding/coder.h
. This leads to one-definition-rule violations when S2 is linked together with other code that also uses classes of the same name (in fact I ran into such problems).In my opinion, there are two possibilities to mitigate this problem:
S2
.Encoder
andDecoder
classes toS2Encoder
andS2Decoder
or using a similar naming scheme.Please let me know, which variant you would prefer, and whether I should prepare a PR or whether you want to fix this yourselves, as it probably would break existing code and would require adaptations in documentations etc.