G++-5 tr1/regex regex_replace could not be resolved
<p>I am using G++-5 with the dialect option <code>-std=c++0x</code> and the preprocessor symbol <code>__GXX_EXPERIMENTAL_CXX0X__</code> and I am trying to use the <code>tr1/regex</code>.</p>

<p>I use <code>#include &lt;tr1/regex&gt;</code> with <code>using namespace std::tr1;</code> and <code>regex reg("&lt;[^&gt;]*&gt;");</code> trows no error.
Only when I use <code>regex_replace(line, reg, "");</code> afterwards, I get the following error output:</p>

<pre><code>Function 'regex_replace' could not be resolved  test.cpp    /cppUni/src line 72 Semantic Error

Invalid arguments '
Candidates are:
#0 regex_replace(#0, #1, #1, const std::tr1::basic_regex&lt;#3,#2&gt; &amp;, const ? &amp;, std::bitset&lt;unsigned long int11&gt;)
? regex_replace(const ? &amp;, const std::tr1::basic_regex&lt;#1,#0&gt; &amp;, const ? &amp;, std::bitset&lt;unsigned long int11&gt;)
'   test.cpp    /cppUni/src line 72 Semantic Error
</code></pre>

<p>I verified, that <code>line</code> is a String.</p>

<p>I searched for a solution the last couple of hours and could only find solutions that involved what I attempted.
Unfortunately I can't use the <code>boost/regex</code> package.</p>

<p>Is there a solution for this issue?</p>

<p>EDIT:</p>

<pre><code>#include &lt;tr1/regex&gt;
#include &lt;iostream&gt;
#include &lt;string&gt;

using namespace std;

int main(){
  std::tr1::regex reg("&lt;[^&gt;]*&gt;");  
  string line = "&lt;Day&gt;22&lt;/Day&gt;";

  if(line.find("&lt;Day&gt;") != string::npos)
    {
        line =std::tr1::regex_replace(line, reg, "");
        cout&lt;&lt;line&lt;&lt;endl;
    }
  return 0;
}
</code></pre>

<p><code>g++-5 -std=c++11 -D__GXX_EXPERIMENTAL_CXX0X__ -Wall test.cpp -o test.out</code></p>