Note that there are some explanatory texts on larger screens.

plurals
  1. POConst correctness and boost::serialization::make_binary_object
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COI don't really understand the use of the `const char *` in your code: if it's a pointer to a constant C string, then the object does not own it, so why save it with the object?
      singulars
    2. COYep...right. That's the code that I'm trying to work with -- and I'd not like make too many changes, if possible. I've split the serialization and deserialization to write a const char* and read into an owned object so that mem operations are handled correctly for the deserialized object. But, the serialization code makes use of the const char* member that is passed into it, and thus has non-onwing semantics -- perhaps that's code smell and I should be wrapping the const char* data into a owning object before serializing, but I'd like to prevent an extra deep copy during the serialization.
      singulars
    3. COI don't know if there's a design issue there. The problem of forcing a const to a non const is that it's undefined behaviour. `make_binary_object` as I understand it is used both for serialization and deserialization, hence the non const requirement. I would probably try to make a separate class to deal specifically with `const char *` in your code, assuming that they are used quite a lot, and with some sharing.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload