Ruby 4.1.0dev (2026-10-21 revision 536dc6f98b72e6999a84bb6373562c43cb1ddf8a)
options.hpp
Go to the documentation of this file.
1
6#ifndef PRISM_OPTIONS_HPP
7#define PRISM_OPTIONS_HPP
8
10
11#include "prism/options.h"
12
13#include <memory>
14
15namespace prism {
16
24 void operator()(pm_options_t *options) const noexcept { pm_options_free(options); }
25};
26
28using unique_options = std::unique_ptr<pm_options_t, options_deleter>;
29
36[[nodiscard]] inline unique_options
37make_options() noexcept {
38 return unique_options(pm_options_new());
39}
40
41}
42
43#endif
The options that can be passed to parsing.
std::unique_ptr< pm_options_t, options_deleter > unique_options
An owned set of options.
Definition options.hpp:28
unique_options make_options() noexcept
Allocate a new set of options with every option at its default.
Definition options.hpp:37
Frees options with pm_options_free.
Definition options.hpp:18
void operator()(pm_options_t *options) const noexcept
Free the given options.
Definition options.hpp:24