C++0x 将不再有概念。意见?这将如何影响你?

标签 c++ c++11 c++-concepts

在 2009 年 7 月 C++0x meeting in Frankfurt , 决定 remove concepts来自 C++0x。就个人而言,我很失望,但我宁愿有一个可实现的 C++0x,也不愿没有 C++0x。他们说他们将在以后添加。

您对这个决定/问题有何看法?它将如何影响您?

最佳答案

就我个人而言,我对删除并不太不满意,因为概念的目的主要是改进编译时错误消息,正如概念提案的共同作者之一 Jeremy Siek 所写的 ( http://lambda-the-ultimate.org/node/3518#comment-50071 ):

While the Concepts proposal was not perfect (can any extension to C++ really ever be perfect?), it would have provided a very usable and helpful extension to the language, an extension that would drastically reduce the infamous error messages that current users of template libraries are plagued with.

当然,概念的用途不仅仅是让编译器给出更短的错误消息,但目前我认为没有它们我们都可以生活。

编辑:Herb Sutter 还在他的 blog 上写道:

Q: Wasn’t this C++0x’s one big feature?

A: No. Concepts would be great, but for most users, the presence or absence of concepts will make no difference to their experience with C++0x except for quality of error messages.

Q: Aren’t concepts about adding major new expressive power to the language, and so enable major new kinds of programs or programming styles?

A: Not really. Concepts are almost entirely about getting better error messages.

关于C++0x 将不再有概念。意见?这将如何影响你?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1154974/

相关文章:

c++ - 如何在C++概念中定义emplace_back和其他可变参数模板函数?

c++ - 为什么 C++ Concepts TS 中同时包含变量和函数概念?

尽管明确声明为私有(private),但 c++ 函数仍可公开调用

c++ - 在构造函数中初始化 <random> 类会导致段错误

未识别 C++ Windows 跳转列表类

c++ - Python 中是否有类似于 C++ 中的结构的数据类型?

c++ - 一个类可以有多个虚表吗?

c++ - 使用 vector<char> 作为缓冲区而不在 resize() 上初始化它

c++ - 如何在 Qt Creator 上使用 pthread

c++ - 我可以通过要删除的对象的回调来删除另一个拥有的对象吗?