string.pass.cpp 805 B

12345678910111213141516171819202122232425262728
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. // <regex>
  9. // template <class charT, class traits = regex_traits<charT>> class basic_regex;
  10. // template <class ST, class SA>
  11. // basic_regex& operator=(const basic_string<charT, ST, SA>& p);
  12. #include <regex>
  13. #include <cassert>
  14. #include "test_macros.h"
  15. int main(int, char**)
  16. {
  17. std::regex r2;
  18. r2 = std::string("(a([bc]))");
  19. assert(r2.flags() == std::regex::ECMAScript);
  20. assert(r2.mark_count() == 2);
  21. return 0;
  22. }