Why does std::forward discard constexpr-ness?

前端 未结 1 1941
不思量自难忘°
不思量自难忘° 2021-01-04 09:50

Being not declared constexpr, std::forward will discard constexpr-ness for any function it forwards arguments to. Why is std::forward

相关标签:
1条回答
  • 2021-01-04 10:09

    The general answer is that the C++ committee's Library Working Group have not done an exhaustive trawl through the working draft looking for opportunities to use the new core facilities. These features have been used where people have had the time and inclination to look at possible uses, but there is not the time for exhaustive checking.

    There are some papers regarding additional uses of constexpr in the works, such as those in the November 2010 mailing.

    0 讨论(0)
提交回复
热议问题