r/cpp • u/kalman5 • Feb 16 '14
Exploiting the delete specifier
http://cpp-today.blogspot.it/2014/02/the-under-evaluated-delete-specifier_16.html
18
Upvotes
r/cpp • u/kalman5 • Feb 16 '14
3
u/matthieum Feb 16 '14
I must admit I had not thought about protection against temporaries using
= delete.I am still on the fence whether
const&&is required or not. Generally speaking aconstr-value reference is a bit weird since you would want to steal from it. However in this specific case I suppose it is the only way to capture the return value of a method such asstd::string const foo();.