Library Configuration module

Preprocessor macros for configuring library functionality.

Contents

Define these before including toml++ to alter the way it functions.

Defines

#define TOML_ALL_INLINE
Sets whether the library is entirely inline.
#define TOML_API
An annotation to add to public symbols.
#define TOML_ASSERT(expr)
Sets the assert function used by the library.
#define TOML_CHAR_8_STRINGS
Uses C++20 char8_t-based strings as the toml string data type.
#define TOML_CONFIG_HEADER
An additional header to include before any other toml++ header files.
#define TOML_EXCEPTIONS
Sets whether the library uses exceptions to report parsing failures.
#define TOML_IMPLEMENTATION
Enables the library's implementation when TOML_ALL_INLINE is enabled.
#define TOML_LARGE_FILES
Sets whether line and column indices are 32-bit integers.
#define TOML_OPTIONAL_TYPE
Overrides the optional<T> type used by the library.
#define TOML_PARSER
Sets whether the parser-related parts of the library are included.
#define TOML_SMALL_FLOAT_TYPE
If your codebase has an additional 'small' float type (e.g. half-precision), this tells toml++ about it.
#define TOML_SMALL_INT_TYPE
If your codebase has an additional 'small' integer type (e.g. 24-bits), this tells toml++ about it.
#define TOML_UNRELEASED_FEATURES
Enables support for unreleased TOML language features not yet part of a numbered version.

Define documentation

#define TOML_ALL_INLINE

Sets whether the library is entirely inline.

Defaults to 1.

#define TOML_API

An annotation to add to public symbols.

Not defined by default.

#define TOML_ASSERT(expr)

Sets the assert function used by the library.

Defaults to the standard C assert().

#define TOML_CHAR_8_STRINGS

Uses C++20 char8_t-based strings as the toml string data type.

Defaults to 0.

#define TOML_CONFIG_HEADER

An additional header to include before any other toml++ header files.

Not defined by default.

#define TOML_EXCEPTIONS

Sets whether the library uses exceptions to report parsing failures.

Defaults to 1 or 0 according to your compiler's exception mode.

#define TOML_IMPLEMENTATION

Enables the library's implementation when TOML_ALL_INLINE is enabled.

Not defined by default. Meaningless when TOML_ALL_INLINE is disabled.

#define TOML_LARGE_FILES

Sets whether line and column indices are 32-bit integers.

Defaults to 0.

#define TOML_OPTIONAL_TYPE

Overrides the optional<T> type used by the library.

Not defined by default (use std::optional).

#define TOML_PARSER

Sets whether the parser-related parts of the library are included.

Defaults to 1.

#define TOML_SMALL_FLOAT_TYPE

If your codebase has an additional 'small' float type (e.g. half-precision), this tells toml++ about it.

Not defined by default.

#define TOML_SMALL_INT_TYPE

If your codebase has an additional 'small' integer type (e.g. 24-bits), this tells toml++ about it.

Not defined by default.

#define TOML_UNRELEASED_FEATURES

Enables support for unreleased TOML language features not yet part of a numbered version.

Defaults to 0.