[PATCH] D55045: Add a version of std::function that includes a few optimizations.
Eric Fiselier via Phabricator
reviews at reviews.llvm.org
Mon Dec 3 12:39:32 PST 2018
EricWF added inline comments.
Comment at: include/functional:1664
+ : public std::integral_constant<
+ bool, sizeof(_Fun) <= sizeof(__storage) &&
> There are other uses of `std::` still.
I actually have no idea why `_VSTD::` exists, or why we would ever need it. One day I hope to kill it.
I'm guess we should do w/e the surrounding code does.
Comment at: test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp:162
- LIBCPP_ASSERT(f.target<Ptr>()); // f is unchanged because the target is small
+ // LIBCPP_ASSERT(f.target<Ptr>()); // f is unchanged because the target is small
Just remove these asserts. I'm not sure how useful they are.
I guess it means we're allowing ourselves to break existing code, but that existing code depended on UB.
I think maybe the asserts were an attempt to establish that the SSO was actually being hit.
CHANGES SINCE LAST ACTION
More information about the libcxx-commits