ref: https://github.com/mendsley/tinystl