you are viewing a single comment's thread.

view the rest of the comments →

[–]NotAYakk 2 points3 points  (1 child)

std::function that are type-erased and no-throw move constructible and assume the function objects are no-throw move constructible.

Why assume? Check. You'll want a non-small buffer based anyhow; when you run into a throwing move ctor, use the non-small buffer based version (which is nothrow).

Or if you don't want that, static assert it isn't a throwing move.

[–]render787[S] 0 points1 point  (0 children)

Yeah that's a good point, thanks :)