cy pres doctrine

definition: a rule that when literal compliance is impossible the intention of a donor or testator should be carried out as nearly as possible
example:
speech part: noun
synonyms: cy pres

How cy pres doctrine is being used?