Water and carbon dioxide in magmatic melts and peculiarities of the melting process