Chapter 10. Serializing native C++ types

Table of Contents

10.1. Serializing numeric data
10.2. Serializing pointers
10.2.1. Pointer tracking
10.2.2. Polymorphic pointers
10.3. Serializing arrays

The library handles all native C++ type except bitfields, unions, and references. References can be handled using split non-intrusive serialization. See the section on serializing user defined types below for details.

If a native type has been omitted, please contact the library maintainers for a correction.

10.1. Serializing numeric data

Booleans, integers (signed and unsigned) and enums (plain enums and typedef'd enums) are mapped to the SQL INTEGER type. The largest integer supported by SQLite3 is a 64-bit integer, which corresponds to the "[unsigned] long long int" type.

Floating point values (float and double) map to the SQL REAL type. If a floating point value is a NAN, it will be written as a SQL NULL value in the database.

The STL complex class is supported by the library.