- In C++ it is fairly common to use std::string as a container for
binary
data. I would not say it is wrong to do that.
I agree with all your points here.
OK guys I see I appear to be in a minority here, so please indulge me.
What's the case for saying that using std::string as a container for
binary data is a good idea? Just because it's common doesn't make
necessarily make it a great thing. To me it seems inappropriate and
there are other containers that seem more valid for binary data. Perhaps
it's just me, but I certainly see a string as a sequence of characters -
in other words textual data.
I'm genuinely curious and I don't want to start a flame war on this :-)
It's not like I'm holier than thou either or hold any sort of moral high
ground as I'm pretty sure that my code contains idioms that set other
people off on one :-D
Frase
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]