鉴于概念,SFINAE 助手是否仍在规范中作为未弃用?

Given Concepts, are SFINAE helpers still in the spec as non-deprecated?

看来 Concepts 可以完成您使用基于 SFINAE 的技术可以完成的所有工作,而且要好得多。优点列表包括提高 重载解决方案 的可读性,并使 编译器诊断 大大减少冗长。

一个选项,假设所有 these Concepts' features are already part of the new draft, is that some or all of these SFINAE related helper templates 都被声明为已弃用。

我主要担心的是功能碎片化

我的问题是这样的弃用提案是否真的已经提交了?

在这一点上,这似乎是一件毫无意义的事情。有 很多 代码使用这些模板,无论如何在可预见的将来它们都不会被删除。

甚至删除三字母以及从字符串文字到非常量的转换 char* 也需要相当长的时间,至少前者甚至不是无可争议的。 (IBM 希望保留它们 iirc。)这些模板在当前的现代 C++ 中已经并且已经有效使用;他们会留在这里.

请注意,弃用 C++ 标准中的功能是一个相当激烈的步骤,将其置于审查之下以备将来删除。它应该是一个临时状态;该功能在某个时候被删除,或者恢复为未弃用:

With the release of a new C++ standard, we get an opportunity to revisit the features identified for deprecation, and consider if we are prepared to clear any out yet, either by removing completely from the standard, or by reversing the deprecation decision and restoring the feature to full service.

In an ideal world, the start of every release cycle would cleanse the list of deprecated features entirely, allowing the language and library to evolve cleanly without holding too much deadweight. In practice, C++ has some long-term deprecated facilities that are difficult to remove, and equally difficult to rehabilitate. Also, with the three year release cadence for the C++ standard, we will often be considering removal of features whose deprecated status has barely reached print.

来自P0619R3,强调我的。


至少现在是这样。我不是委员会的成员,所以我只能推测,但我不排除在未来某个时候弃用的可能性,在概念已经确定之后,如果旧的帮助模板做更多的事情变得明显弊大于利。