Does a civil partnership invalidate a will?

Many people are completely unaware that the act of forming a civil partnership automatically invalidates a will, in the same way as getting married does. However, there is one exception to this general rule.