返回地图的 map::lower_bound
是否有一个函数与 map::lower_bound
执行相同的操作,只是它返回一个新的子映射而不是迭代器?
编辑:该函数应返回一个子映射,其中包含键等于或大于某个值(作为输入给出的所有值)的函数)。
Is there a function that does the same thing as map::lower_bound
except it returns a new sub-map and not an iterator?
Edit: The function should return a sub-map which contains all the values for which the key is equal to, or greater than a certain value (which is given as input to the function).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
像这样的东西吗?
编辑:看来您实际上想要
upper_bound()
而不是lower_bound()
。Something like this?
Edit: It seems you actually want
upper_bound()
instead oflower_bound()
.