Read and interpret configuration settings from a stream.

Synopsis

Declared in <common/args.h>

[[nodiscard, requires_capability(0x7f2e381ab9e8)]]
bool
ReadConfigStream(
    std::istream& stream,
    std::string const& filepath,
    std::string& error,
    bool ignore_invalid_keys = false);

Return Value

true if the stream was parsed successfully.

Note

The return value should not be discarded.

Parameters

Name

Description

stream

The input stream to read config lines from.

filepath

Path used for error messages and section tracking.

error

Populated with a message if parsing fails.

ignore_invalid_keys

Skip unknown keys instead of failing.

Created with MrDocs