Quick A: because it prevents moving from the value.
Recently on SO:
Why is const template parameter not a universal/forwarding reference?
Because it is a reference to const. And references to const are not forwarding references...
November 14-16, Berlin, Germany
November 18-23, Wrocław, Poland
November 25, Wrocław, Poland
February 10-15, Hagenberg, Austria
March 19-21, Madrid, Spain
April 1-4, Bristol, UK
June 16-21, Sofia, Bulgaria
By Adrien Hamelin | Sep 1, 2020 11:13 AM | Tags: intermediate c++11
Quick A: because it prevents moving from the value.
Recently on SO:
Why is const template parameter not a universal/forwarding reference?
Because it is a reference to const. And references to const are not forwarding references...
There are currently no comments on this entry.
Add a Comment
Comments are closed.