Home | History | Annotate | Download | only in re.alg.search
      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 
     10 // <regex>
     11 
     12 // template <class BidirectionalIterator, class Allocator, class charT, class traits>
     13 //     bool
     14 //     regex_search(BidirectionalIterator first, BidirectionalIterator last,
     15 //                  match_results<BidirectionalIterator, Allocator>& m,
     16 //                  const basic_regex<charT, traits>& e,
     17 //                  regex_constants::match_flag_type flags = regex_constants::match_default);
     18 
     19 #include <regex>
     20 #include <cassert>
     21 #include "test_macros.h"
     22 
     23 // PR34310
     24 int main()
     25 {
     26   assert(std::regex_search("HelloWorld", std::regex("[^\\W]")));
     27   assert(std::regex_search("_", std::regex("[^\\W]")));
     28   return 0;
     29 }
     30