r/cpp • u/stanimirov • Jul 04 '18
Be Mindful with Compiler-Generated Move Constructors
https://ibob.github.io/blog/2018/07/03/compiler-generated-move/
89
Upvotes
r/cpp • u/stanimirov • Jul 04 '18
View all comments
Show parent comment
1
u/meneldal2 Jul 05 '18
I guess you could add (another) parameter to the
std::functiontemplate, that will determine whether move is constexpr or not. It would default to this unless the function needs to allow exceptions, and a implicit conversion from exception-lessstd::functionto exception-allowedstd::functionwould be added.Is there something I'm missing here?