I am having trouble understanding the advantage of the following switched capacitor circuit that divides the input voltage by 2. 
When the switch is in its initial position, C1 and C2 are in series and form a simple capactive voltage divider. Heres my attempt to express this mathematically $$ v_{in} = \frac{Q}{C_{tot}}, \qquad v_{out}=\frac{Q}{C_1} \\\\ v_{out}=\frac{C_{tot}}{C_1}v_{in} \\\\ v_{out}=\frac{C_2}{C_1+C_2}v_{in} $$ Assuming that C1 and C2 are equal we then get $$v_{out}=\frac{v_{in}}{2}$$ .
Now if the switch is in the second position the two charged capacitors are noe connected in parallel. Each of the two capacitors holds the charge Q which means that the output voltage across the two parallel capacitors is now $$ v_{out} = \frac{Q_{tot}}{C_{tot}}=\frac{2Q}{C_1+C_2} $$ Assuming that C1 and C2 are equal this again results in $$ v_{out}=\frac{v_{in}}{2} $$ Now heres my question: Assuming that my math is correct, whats the advantage of using this circuit instead of simply using a capacitive voltage divider (or even one with simple resistors)?