port of boost::multi_index