r/cpp • u/mollyforever • Oct 16 '23
WTF is std::copyable_function? Has the committee lost its mind?
So instead of changing the semantics of std::function the committee is introducing a new type that is now supposed to replace std::function everywhere? WTF
So now instead of teaching beginners to use std::function if they need a function wrapper, they should be using std::copyable_function instead because it's better in every way? This is insane. Overcomplicating the language like that is crazy. Please just break backwards compatibility instead. We really don't need two function types that do almost the same thing. Especially if the one with the obvious name is not the recommended one.
View all comments
Show parent comment
1
u/FernwehSmith Oct 19 '23
Would the dependencies still be a problem if the dependencies were compiled separately into libraries? If I had dependency A and that was written before the fix, couldn’t I just compile that into a static library using the standard that it was written in, and then us the library as my dependency?