> `F` satisfies the current `is_empty_trivial` test, but constructing an owning wrapper from `f` would normally construct a target object and therefore invoke the copy constructor. Eliminating the object also eliminates that observable effect.
>
> More generally, an empty object does not imply that its identity or lifetime is unobservable; `operator()` may also use `this`. So I suspect that trying to infer semantic statelessness from representation/type traits is difficult to make generally safe.
This is indeed an area where I didn't think things through thoroughly. I used to think `is_empty_trivial` does not indicate stateless only in non-owning semantics (`IsView` == true) and ignored the side effects in the lifetime management in owning semantics.
There are basically two categories of side effects:
1. side effects in lifetime management;
2. use of `this` in `operator()`.
For the first category, adding `std::is_trivially_move_constructible` and `std::is_trivially_copy_constructible` would be sufficient to eliminate the issue. However, there seems to be no reliable way to eliminate the second category.