为什么没有标准:: copy_if算法? [英] Why there is no std::copy_if algorithm?

查看:164
本文介绍了为什么没有标准:: copy_if算法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么具体原因没有在C ++的std :: copy_if算法?我知道我可以使用std :: remove_copy_if达到所要求的行为。我认为这是未来在C ++ 0x中,但一个简单的copy_if这需要一个范围,一个输出迭代器和函数对象本来不错。当时它只是简单地错过了或者是有一些背后的其他原因?

Is there any specific reason for not having std::copy_if algorithm in C++ ? I know I can use std::remove_copy_if to achieve the required behavior. I think it is coming in C++0x, but a simple copy_if which takes a range, a output iterator and a functor would have been nice. Was it just simply missed out or is there some other reason behind it?

推荐答案

据Stroustrup的C ++程序设计语言,其实只是一种过度的视线。

According to Stroustrup's "The C++ Programming Language" it was just an over-sight.

(作为引证,同样的问题回答升压邮件列表: copy_if

(as a citation, the same question answered in boost mail-lists: copy_if)

这篇关于为什么没有标准:: copy_if算法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆