Float and double would be awkward to use reliably even if they were possible - don't forget that performing exact equality matches on float/double is usually a bad idea anyway, due to the nature of the representation.
For Boolean values, why not just use if
to start with?
I can't remember ever wanting to switch on any of these types, to be honest. Do you have a particular use case in mind?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…