I\'ve been digging around ref-qualifiers a bit, following on a previous question.
Given the code sample below;
#include
#include <
We can find a similar exploration of this issue in the article What are const rvalue references good for? and the one use that stood out is this example form the standard library:
template void ref (const T&&) = delete;
template void cref (const T&&) = delete;
which disables ref and cref for rvalues altogether. We can find these declarations in the draft C++11 standard section 20.8 Function objects paragraph 2.
Scott Meyers alludes to this use in Universal References in C++11:
Even the simple addition of a const qualifier is enough to disable the interpretation of “&&” as a universal reference: