by restructuring a bit : - bool get_contexts(T va, T vb, H_context_list*&) const; + H_context_list * get_contexts(T va, T vb) const; And updated callers (now NULL encodes the old false return value).