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...
March 11-13, Online
March 16-18, Madrid, Spain
March 23-28, Croydon, London, UK
March 30, Kortrijk, Belgium
May 4-8, Aspen, CO, USA
May 4-8, Toronto, Canada
June 8 to 13, Brno, Czechia
June 17-20, Folkestone, UK
September 12-18, Aurora, CO, USA
November 6-8, Berlin, Germany
November 16-21, Búzios, Rio De Janeiro, Brazil
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.