il.pass.cpp 810 B

1234567891011121314151617181920212223242526272829
  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. // UNSUPPORTED: c++98, c++03
  9. // <regex>
  10. // template <class charT, class traits = regex_traits<charT>> class basic_regex;
  11. // basic_regex& operator=(initializer_list<charT> il);
  12. #include <regex>
  13. #include <cassert>
  14. #include "test_macros.h"
  15. int main(int, char**)
  16. {
  17. std::regex r2;
  18. r2 = {'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'};
  19. assert(r2.flags() == std::regex::ECMAScript);
  20. assert(r2.mark_count() == 2);
  21. return 0;
  22. }