On the bonding in doubly charged diatomics