constexpr.cc 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // { dg-do compile { target c++11 } }
  2. // { dg-timeout-factor 2 }
  3. //
  4. // Copyright (C) 2015-2022 Free Software Foundation, Inc.
  5. //
  6. // This file is part of the GNU ISO C++ Library. This library is free
  7. // software; you can redistribute it and/or modify it under the
  8. // terms of the GNU General Public License as published by the
  9. // Free Software Foundation; either version 3, or (at your option)
  10. // any later version.
  11. //
  12. // This library is distributed in the hope that it will be useful,
  13. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. // GNU General Public License for more details.
  16. //
  17. // You should have received a copy of the GNU General Public License along
  18. // with this library; see the file COPYING3. If not see
  19. // <http://www.gnu.org/licenses/>.
  20. #include <regex>
  21. // libstdc++/65420
  22. void
  23. test01()
  24. {
  25. const std::regex_constants::syntax_option_type* option __attribute__((unused));
  26. option = &std::regex_constants::icase;
  27. option = &std::regex_constants::nosubs;
  28. option = &std::regex_constants::optimize;
  29. option = &std::regex_constants::collate;
  30. option = &std::regex_constants::ECMAScript;
  31. option = &std::regex_constants::basic;
  32. option = &std::regex_constants::extended;
  33. option = &std::regex_constants::awk;
  34. option = &std::regex_constants::grep;
  35. option = &std::regex_constants::egrep;
  36. const std::regex_constants::match_flag_type* flag __attribute__((unused));
  37. flag = &std::regex_constants::match_not_bol;
  38. flag = &std::regex_constants::match_not_eol;
  39. flag = &std::regex_constants::match_not_bow;
  40. flag = &std::regex_constants::match_not_eow;
  41. flag = &std::regex_constants::match_any;
  42. flag = &std::regex_constants::match_not_null;
  43. flag = &std::regex_constants::match_continuous;
  44. flag = &std::regex_constants::match_prev_avail;
  45. flag = &std::regex_constants::format_default;
  46. flag = &std::regex_constants::format_sed;
  47. flag = &std::regex_constants::format_no_copy;
  48. flag = &std::regex_constants::format_first_only;
  49. }
  50. int main()
  51. {
  52. test01();
  53. return 0;
  54. }