clang 4 build error on <functional> with c++1z

强颜欢笑 提交于 2019-11-30 19:35:18

Little late but I would like to sum it up.

This:

template <typename _Tp> optional(_Tp) -> optional<_Tp>;

is the example of deduction guides. Here you can find nice explanation of this language feature.

New version of libstdc++ uses it in its implementation when -std=c++17 or c++1z flag is in use. Unfortunately Clang does not support this feature yet. Clang C++1z status page reports it as available only on SVN.

You can find bug report for Arch Linux here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!