default.pass.cpp 786 B

12345678910111213141516171819202122232425262728293031323334
  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. // basic_regex();
  11. #include <regex>
  12. #include <cassert>
  13. #include "test_macros.h"
  14. template <class CharT>
  15. void
  16. test()
  17. {
  18. std::basic_regex<CharT> r;
  19. assert(r.flags() == std::regex_constants::ECMAScript);
  20. assert(r.mark_count() == 0);
  21. }
  22. int main(int, char**)
  23. {
  24. test<char>();
  25. test<wchar_t>();
  26. return 0;
  27. }