This isn't part of the LevelDB API, which deals in slices.
I assume you are taking these structs and doing something like:
TripleValues t(...)
leveldb::Slice value(&t, sizeof(t));
This will work for BinValues because it's a struct of plain old data
(you'll see this called a POD struct). The TripleValues struct won't
work because strVal is a non-plain type, and what you'd be serializing
is the members of the struct. In this case, that would be pointers to
the actual string data that you want to store.
You'll need to transform TripleValues into a byte string that does what
you want.
-Robert
> --
> You received this message because you are subscribed to the Google Groups
> "leveldb" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to
leveldb+u...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.