This commit is contained in:
Mars 2025-05-13 01:48:08 -04:00
parent 009556cabf
commit 3d1d344ec1
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895
14 changed files with 383 additions and 196 deletions

View file

@ -729,7 +729,8 @@ namespace matchit {
template <typename Unary, typename Pattern>
class App {
public:
constexpr App(Unary&& unary, const Pattern& pattern) : mUnary { std::move(unary) }, mPattern { pattern } {}
constexpr App(Unary&& unary, const Pattern& pattern)
: mUnary { std::move(unary) }, mPattern { pattern } {}
[[nodiscard]] constexpr fn unary() const -> const Unary& {
return mUnary;
@ -1086,7 +1087,8 @@ namespace matchit {
public:
constexpr Id() = default;
constexpr Id(const Id& id) : mBlock(BlockVT { &id.block() }) {}
constexpr Id(const Id& id)
: mBlock(BlockVT { &id.block() }) {}
// non-const to inform users not to mark Id as const.
template <typename Pattern>
@ -1790,4 +1792,4 @@ namespace matchit {
using impl::SubrangeT;
using impl::when;
} // namespace matchit
// NOLINTEND(readability-identifier-*, cppcoreguidelines-special-member-functions)
// NOLINTEND(readability-identifier-*, cppcoreguidelines-special-member-functions)