diff options
Diffstat (limited to 'nihil.config')
| -rw-r--r-- | nihil.config/option.ccm | 8 | ||||
| -rw-r--r-- | nihil.config/write.ccm | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/nihil.config/option.ccm b/nihil.config/option.ccm index c095d34..c6ebcae 100644 --- a/nihil.config/option.ccm +++ b/nihil.config/option.ccm @@ -78,17 +78,17 @@ protected: /* * Get or set this option as a string. */ - virtual auto get_string() const + [[nodiscard]] virtual auto get_string() const -> std::string = 0; - virtual auto set_string(std::string_view) + [[nodiscard]] virtual auto set_string(std::string_view) -> std::expected<void, error> = 0; /* * Get or set this option as a UCL object. */ - virtual auto get_ucl() const + [[nodiscard]] virtual auto get_ucl() const -> std::expected<ucl::object, error> = 0; - virtual auto set_ucl(ucl::object const &) + [[nodiscard]] virtual auto set_ucl(ucl::object const &) -> std::expected<void, error> = 0; private: diff --git a/nihil.config/write.ccm b/nihil.config/write.ccm index cb35d76..8fb8151 100644 --- a/nihil.config/write.ccm +++ b/nihil.config/write.ccm @@ -11,12 +11,12 @@ export module nihil.config:write; import nihil; -export namespace nihil::config { +namespace nihil::config { /* * Write all config values (except defaults) to disk. */ -auto write_to(std::filesystem::path const &filename) -> +export [[nodiscard]] auto write_to(std::filesystem::path const &filename) -> std::expected<void, error>; }; |
