Configurable trait for switching optional<T> implementations