diff --git a/doc/traits.html b/doc/traits.html index b00765dc4..474b7f1a3 100644 --- a/doc/traits.html +++ b/doc/traits.html @@ -145,6 +145,22 @@

Implementation Level


 BOOST_CLASS_IMPLEMENTATION(my_class, boost::serialization::object_class_info)
 
+Take care when assigning primitive_type. +It states that the archive already handles the type itself; it is not a request +to make it do so. Archives implement primitives for the fundamental types and +for std::string and +std::wstring. For any other type they +fall back to stream extraction, in the text and xml archives, or to a copy of +sizeof(T) raw bytes, in the binary +ones. Assigning the level to a type an archive knows nothing about therefore +compiles, but reads back a wrong value rather than failing: declared this way, +a std::pmr::string stops at the first +space. A string whose allocator is not +std::allocator needs no such +declaration, as +string.hpp +serializes it just like std::string. +

If implementation level is not explicitly assigned, the system uses a default according to the following rules.