Cartan–Eilenberg complexes with respect to cotorsion pairs