libstdc++
regex
Go to the documentation of this file.
00001 // <regex> -*- C++ -*-
00002 
00003 // Copyright (C) 2007-2019 Free Software Foundation, Inc.
00004 //
00005 // This file is part of the GNU ISO C++ Library.  This library is free
00006 // software; you can redistribute it and/or modify it under the
00007 // terms of the GNU General Public License as published by the
00008 // Free Software Foundation; either version 3, or (at your option)
00009 // any later version.
00010 
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU General Public License for more details.
00015 
00016 // Under Section 7 of GPL version 3, you are granted additional
00017 // permissions described in the GCC Runtime Library Exception, version
00018 // 3.1, as published by the Free Software Foundation.
00019 
00020 // You should have received a copy of the GNU General Public License and
00021 // a copy of the GCC Runtime Library Exception along with this program;
00022 // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
00023 // <http://www.gnu.org/licenses/>.
00024 
00025 /** @file include/regex
00026  *  This is a Standard C++ Library header.
00027  */
00028 
00029 #ifndef _GLIBCXX_REGEX
00030 #define _GLIBCXX_REGEX 1
00031 
00032 #pragma GCC system_header
00033 
00034 #if __cplusplus < 201103L
00035 # include <bits/c++0x_warning.h>
00036 #else
00037 
00038 #include <algorithm>
00039 #include <bitset>
00040 #ifdef _GLIBCXX_DEBUG
00041 # include <iosfwd>
00042 #endif
00043 #include <iterator>
00044 #include <locale>
00045 #include <memory>
00046 #include <sstream>
00047 #include <stack>
00048 #include <stdexcept>
00049 #include <string>
00050 #include <utility>
00051 #include <vector>
00052 #include <map>
00053 #include <cstring>
00054 
00055 #include <ext/aligned_buffer.h>
00056 #include <bits/std_function.h>
00057 #include <bits/regex_constants.h>
00058 #include <bits/regex_error.h>
00059 #include <bits/regex_automaton.h>
00060 #include <bits/regex_scanner.h>
00061 #include <bits/regex_compiler.h>
00062 #include <bits/regex.h>
00063 #include <bits/regex_executor.h>
00064 
00065 #if __cplusplus >= 201703L && _GLIBCXX_USE_CXX11_ABI
00066 #include <memory_resource>
00067 namespace std _GLIBCXX_VISIBILITY(default)
00068 {
00069 _GLIBCXX_BEGIN_NAMESPACE_VERSION
00070   namespace pmr {
00071     template<typename _Tp> class polymorphic_allocator;
00072     template<typename _BidirectionalIterator>
00073       using match_results
00074         = std::match_results<_BidirectionalIterator, polymorphic_allocator<
00075                                 sub_match<_BidirectionalIterator>>>;
00076     using cmatch  = match_results<const char*>;
00077     using smatch  = match_results<string::const_iterator>;
00078 #ifdef _GLIBCXX_USE_WCHAR_T
00079     using wcmatch = match_results<const wchar_t*>;
00080     using wsmatch = match_results<wstring::const_iterator>;
00081 #endif
00082   } // namespace pmr
00083 _GLIBCXX_END_NAMESPACE_VERSION
00084 } // namespace std
00085 #endif // C++17
00086 #endif // C++11
00087 
00088 #endif // _GLIBCXX_REGEX