il.pass.cpp 773 B

12345678910111213141516171819202122232425262728
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is dual licensed under the MIT and the University of Illinois Open
  6. // Source Licenses. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. // UNSUPPORTED: c++98, c++03
  10. // <regex>
  11. // template <class charT, class traits = regex_traits<charT>> class basic_regex;
  12. // basic_regex& operator=(initializer_list<charT> il);
  13. #include <regex>
  14. #include <cassert>
  15. #include "test_macros.h"
  16. int main()
  17. {
  18. std::regex r2;
  19. r2 = {'(', 'a', '(', '[', 'b', 'c', ']', ')', ')'};
  20. assert(r2.flags() == std::regex::ECMAScript);
  21. assert(r2.mark_count() == 2);
  22. }