Continuous and discontinuous opinion dynamics with bounded confidence