Le 08/06/2016 à 01:30, Guillaume Munch a écrit :
Try changing 'return rc;' to 'return std::move(rc);' (twice).
Unfortunately, with Georg's recent changes, I don't think that your patches still apply. The best would be to publish the branch you are working on in the features repository and remerge it as needed.
I believe clang is right and gcc is wrong. gcc treats rc as an rvalue, which makes the conversion into unique_ptr<Revertible> valid. But rc should not be considered as an rvalue, because the standard only allows the case when the return type matches the type of the expression (up to cv-qualifiers).
Hmm, this is way above my head :) But the rule of thumb "clang is usually right" is usually right.
JMarc