]> git.ipfire.org Git - thirdparty/squid.git/blame - src/base/RegexPattern.cc
C++11: Remove GnuRegex and all -lregex related code
[thirdparty/squid.git] / src / base / RegexPattern.cc
CommitLineData
3ebc8300 1/*
ef57eb7b 2 * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
3ebc8300 3 *
bbc27441
AJ
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
3ebc8300
FC
7 */
8
9#include "squid.h"
8fcefb30 10#include "base/RegexPattern.h"
6226856f 11#include <utility>
3ebc8300 12
6d2a427b
AJ
13RegexPattern::RegexPattern(const std::regex_constants::syntax_option_type &aFlags, const char *aPattern) :
14 flags(aFlags),
15 pattern(xstrdup(aPattern)),
16 regex(pattern, flags)
17{}
388e5028 18
b9a9207b
AJ
19RegexPattern &
20RegexPattern::operator =(RegexPattern &&o)
21{
6226856f 22 flags = std::move(o.flags);
b9a9207b 23 regex = std::move(o.regex);
c438bcf1 24 pattern = o.pattern;
b9a9207b
AJ
25 o.pattern = nullptr;
26 return *this;
27}
3e8d4ad8 28