How can I copy a volatile std::string
? There is no copy constructor for volatile, nor does something like c_str
allow volatile access. operator=
also doesn't seem to allow setting a volatile. It seems like std::string
is simply unusable as a volatile object. Is this intended, or am I missing some way to use it?
NOTE: I have easy workarounds, I just came upon the issue while trying to use string in some low-level code.