
On Sun, Jul 8, 2012 at 10:05 PM, Robert Ramey <ramey@rrsd.com> wrote:
It always seemed to me that it would be interesting to use this approach to compose code_convert facets to taste. But code_convert facets aren't all that popular so the idea. So it's not clear that this would be a worthwhile project.
I think a problem with the codecvt approach might be that, although codecvt supports N:M conversion (e.g. 3:4 in case of Bas64), std::basic_filebuf can only use codecvt facets that define a 1:N conversion [1].
From what I read so far, the basic question seems to be whether encoding/decoding should be supported as a "first-class" algorithm (like copy, transform, rotate, etc.) or not. From my experience, the subtleties involved (padding, handling of non-alphabet characters) are easier to handle with the algorithm approach.