This duplicates the functionality provided by `acceptAllFilter<T>` in util.hpp. This should be unified.