message: add default ctor

Useful for stuffing messages in async-queues
This commit is contained in:
Dirk-Jan C. Binnema
2024-05-26 13:58:31 +03:00
parent 1e9f772e0a
commit e3ab780413
2 changed files with 10 additions and 0 deletions

View File

@ -104,6 +104,10 @@ get_statbuf(const std::string& path, Message::Options opts = Message::Options::N
return Ok(std::move(statbuf)); return Ok(std::move(statbuf));
} }
Message::Message() noexcept:
priv_{std::make_unique<Private>(Message::Options::None)}
{}
Message::Message(const std::string& path, Message::Options opts): Message::Message(const std::string& path, Message::Options opts):
priv_{std::make_unique<Private>(opts)} priv_{std::make_unique<Private>(opts)}

View File

@ -55,6 +55,12 @@ public:
* CJK and other languages. */ * CJK and other languages. */
}; };
/**
* Default CTOR; not useful by itself, but can be moved into.
*/
Message() noexcept;
/** /**
* Move CTOR * Move CTOR
* *