I'm fond of sorted vectors as well such as boost flat_map. The worst case performance can be surprising! But eventually if it gets too big you'll need a btree
Range queries do not really work well on sorted vectors even if you have as many as needed indices. Immutability and race freedom are even more complex.
With a tree, copy on write solves many problems. (And can be much cheaper than copying whole structure.) If not, you can atomically replace subtrees in a safe way.