Note that there are some explanatory texts on larger screens.

plurals
  1. POerror while using regex_replace function from <tr1/regex>
    primarykey
    data
    text
    <pre><code>#include &lt;string&gt; #include &lt;tr1/regex&gt; #include "TextProcessing.h" const std::string URL_PATTERN("((http://)[-a-zA-Z0-9@:%_\\+.~#?&amp;//=]+)"); const std::string REPLACEMENT("&lt;a href=\"$&amp;\"\"&gt;$&amp;&lt;/a&gt;"); std::string textprocessing::processLinks(const std::string &amp; text) { // essentially the same regex as in the previous example, but using a dynamic regex std::tr1::regex url(URL_PATTERN); // As in Perl, $&amp; is a reference to the sub-string that matched the regex return std::tr1::regex_replace(text, url, REPLACEMENT); } </code></pre> <p>I'm using mingw gcc copiler 4.5.0 version.</p> <p>I've got the follow error:</p> <pre><code>%DEV%&gt; mingw32-make all g++ -Wl,--enable-auto-import -Wall -Wextra -std=c++0x -pedantic -Werror -c -I./include TextProcessing.cpp cc1plus.exe: warnings being treated as errors c:\dev\mingw\bin\../lib/gcc/mingw32/4.5.0/include/c++/tr1_impl/regex:2390:5: error: inline function '_Out_iter std::tr1::regex_replace(_Out_iter, _Bi_iter, _Bi_iter, const std::tr1::basic_regex&lt;_Ch_type, _Rx_traits&gt;&amp;, const std::basic_string&lt;_Ch_type&gt;&amp;, std::tr1::regex_constants::match_flag_type) [with _Out_iter = std::back_insert_iterator&lt;std::basic_string&lt;char&gt; &gt;, _Bi_iter = __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char&gt; &gt;, _Rx_traits = std::tr1::regex_traits&lt;char&gt;, _Ch_type = char, std::tr1::regex_constants::match_flag_type = std::bitset&lt;11u&gt;]' used but never defined mingw32-make: *** [TextProcessing.o] Error 1 Process mingw32-make exited with code 2 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload