Make the creation post-process functor generic to avoid casting