瀏覽代碼

LibRegex: Make regex::Regex move-constructible and move-assignable

For some reason the default move constructor and default move-assign
operator were deleted, so we explicitly default them instead.
Andrew Kaster 4 年之前
父節點
當前提交
5e8a0c014e
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Userland/Libraries/LibRegex/RegexMatcher.h

+ 2 - 0
Userland/Libraries/LibRegex/RegexMatcher.h

@@ -77,6 +77,8 @@ public:
 
 
     explicit Regex(StringView pattern, typename ParserTraits<Parser>::OptionsType regex_options = {});
     explicit Regex(StringView pattern, typename ParserTraits<Parser>::OptionsType regex_options = {});
     ~Regex() = default;
     ~Regex() = default;
+    Regex(Regex&&) = default;
+    Regex& operator=(Regex&&) = default;
 
 
     typename ParserTraits<Parser>::OptionsType options() const;
     typename ParserTraits<Parser>::OptionsType options() const;
     void print_bytecode(FILE* f = stdout) const;
     void print_bytecode(FILE* f = stdout) const;