Does anyone know of a performant, well-tested C++ implementation of an interval tree that you can attach values to? I know of: https://github.com/ekg/intervaltree which has bugs & is very slow, https://doc.cgal.org/latest/Interval_skip_list/index.html#Chapter_Interval_Skip_List which looks amazing but appears to bring a lot of baggage & I don't know about performance and https://www.boost.org/doc/libs/latest/libs/icl/doc/html/boost/icl/interval_map.html which I hear is slow. Help?
GitHub - ekg/intervaltree: a minimal C++ interval tree implementation

a minimal C++ interval tree implementation. Contribute to ekg/intervaltree development by creating an account on GitHub.

GitHub
So DNA (where these trees are used a lot) has a local Fabrice Bellard-equivalent, and he (Heng Li) wrote https://github.com/lh3/cgranges which appears to be excellent. Will give it a spin! Although I'm using this for IPv6 addresses and not DNA loci. Let's hope it works!
@bert_hubert
You mention IPv6. Are you using this for longest prefix lookup?
Can the intervals overlap partially or do they only overlap fully?
@AkaSci sadly the IP ranges *could* overlap, and are not on neat bit boundaries. This is not longest prefix lookup. I need to map IP address to countries using (for example) the Maxmind CSV https://db-ip.com/db/download/ip-to-country-lite - but good news, it all works now!
IP to Country Lite Free Database Download

IP to Country Lite Free Database Download