#ifndef AFUN_TOOL_REGEX_INLINE_H #define AFUN_TOOL_REGEX_INLINE_H #include "tool-regex.h" namespace aFuntool { Regex::Regex(const Regex ®ex) noexcept: Regex(regex.pattern) { } Regex::Regex(Regex &®ex) noexcept : pattern {std::move(regex.pattern)}, re {regex.re} { regex.re = nullptr; } Regex::~Regex() noexcept { if (re != nullptr) pcre2_code_free(re); } } #endif //AFUN_TOOL_REGEX_INLINE_H