make bitwise_cast more const-correct