regex 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // -*- C++ -*-
  2. //===----------------------------------------------------------------------===//
  3. //
  4. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  5. // See https://llvm.org/LICENSE.txt for license information.
  6. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #ifndef _LIBCPP_EXPERIMENTAL_REGEX
  10. #define _LIBCPP_EXPERIMENTAL_REGEX
  11. /*
  12. experimental/regex synopsis
  13. // C++1z
  14. namespace std {
  15. namespace experimental {
  16. inline namespace fundamentals_v1 {
  17. namespace pmr {
  18. template <class BidirectionalIterator>
  19. using match_results =
  20. std::match_results<BidirectionalIterator,
  21. polymorphic_allocator<sub_match<BidirectionalIterator>>>;
  22. typedef match_results<const char*> cmatch;
  23. typedef match_results<const wchar_t*> wcmatch;
  24. typedef match_results<string::const_iterator> smatch;
  25. typedef match_results<wstring::const_iterator> wsmatch;
  26. } // namespace pmr
  27. } // namespace fundamentals_v1
  28. } // namespace experimental
  29. } // namespace std
  30. */
  31. #include <experimental/__config>
  32. #include <experimental/memory_resource>
  33. #include <experimental/string>
  34. #include <regex>
  35. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  36. # pragma GCC system_header
  37. #endif
  38. _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
  39. template <class _BiDirIter>
  40. using match_results =
  41. _VSTD::match_results<_BiDirIter,
  42. polymorphic_allocator<_VSTD::sub_match<_BiDirIter>>>;
  43. typedef match_results<const char*> cmatch;
  44. typedef match_results<_VSTD_LFTS_PMR::string::const_iterator> smatch;
  45. #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
  46. typedef match_results<const wchar_t*> wcmatch;
  47. typedef match_results<_VSTD_LFTS_PMR::wstring::const_iterator> wsmatch;
  48. #endif
  49. _LIBCPP_END_NAMESPACE_LFTS_PMR
  50. #endif /* _LIBCPP_EXPERIMENTAL_REGEX */