The following code causes a segfault:
std::pmr::deque<func::function<void()>> functions { };
func::function<void()> f { [] { } };
functions.push_back(f);
However, creating a single function with the pmr allocator does not:
func::function<void()> f { std::allocator_arg, std::pmr::polymorphic_allocator<> { }, [] { } };
And this also works:
functions.push_back([] { });
Possibly related to #2 somehow, but std::pmr::polymorphic_allocator has no virtual destructor.