<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Compiler Fehler VS2010 &#x2F; VS2008, std::tr1::bind]]></title><description><![CDATA[<p>Hi,</p>
<p>Folgender Code compiliert unter VS2010 mit neuem Toolset ohne Probleme.<br />
Mit dem alten (=VS2008) Toolset wird folgende Fehlermeldung ausgegeben:</p>
<blockquote>
<p>1&gt;c:\program files\microsoft visual studio 9.0\vc\include\xxpmfcaller(56): error C2100: illegal indirection<br />
1&gt; c:\program files\microsoft visual studio 9.0\vc\include\xxpmfcaller(64) : see reference to function template instantiation '_Ret std::tr1::_Pmf_caller2&lt;_Ret,_Arg0&gt;::_Call_pmf&lt;_Pmf,_Farg0&amp;,_Farg1&amp;&gt;(volatile const void <em>,_Pmf,std::tr1::reference_wrapper&lt;_Ty&gt;,wchar_t)' being compiled<br />
1&gt; with<br />
1&gt; [<br />
1&gt; _Ret=_Rx,<br />
1&gt; _Arg0=std::ctype&lt;wchar_t&gt;,<br />
1&gt; _Pmf=std::ctype&lt;wchar_t&gt;::_Elem (__thiscall std::ctype&lt;wchar_t&gt;::</em> const )(std::ctype&lt;wchar_t&gt;::_Elem) const,<br />
1&gt; _Farg0=std::tr1::reference_wrapper&lt;const std::ctype&lt;wchar_t&gt;&gt;,<br />
1&gt; _Farg1=wchar_t,<br />
1&gt; _Ty=const std::ctype&lt;wchar_t&gt;<br />
1&gt; ]<br />
... weitere Fehler gleicher Art ...</p>
</blockquote>
<pre><code class="language-cpp">static std::wstring tolower(std::wstring string)
{
    const std::ctype&lt;wchar_t&gt;&amp; ct = std::use_facet&lt;std::ctype&lt;wchar_t&gt; &gt;(std::locale());
    std::transform(string.begin(), string.end(), string.begin(), std::tr1::bind(&amp;std::ctype&lt;wchar_t&gt;::tolower, std::tr1::cref(ct), std::tr1::placeholders::_1));
    return string;
}
</code></pre>
<p>Meiner Meinung nach müsste das für den Compiler (auch mit altem Toolset) kein Problem sein. Weiss jmd. Rat?</p>
<p>Simon</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/274987/compiler-fehler-vs2010-vs2008-std-tr1-bind</link><generator>RSS for Node</generator><lastBuildDate>Thu, 27 Aug 2026 06:16:57 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/274987.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 06 Oct 2010 16:08:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Compiler Fehler VS2010 &#x2F; VS2008, std::tr1::bind on Wed, 06 Oct 2010 16:08:04 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>Folgender Code compiliert unter VS2010 mit neuem Toolset ohne Probleme.<br />
Mit dem alten (=VS2008) Toolset wird folgende Fehlermeldung ausgegeben:</p>
<blockquote>
<p>1&gt;c:\program files\microsoft visual studio 9.0\vc\include\xxpmfcaller(56): error C2100: illegal indirection<br />
1&gt; c:\program files\microsoft visual studio 9.0\vc\include\xxpmfcaller(64) : see reference to function template instantiation '_Ret std::tr1::_Pmf_caller2&lt;_Ret,_Arg0&gt;::_Call_pmf&lt;_Pmf,_Farg0&amp;,_Farg1&amp;&gt;(volatile const void <em>,_Pmf,std::tr1::reference_wrapper&lt;_Ty&gt;,wchar_t)' being compiled<br />
1&gt; with<br />
1&gt; [<br />
1&gt; _Ret=_Rx,<br />
1&gt; _Arg0=std::ctype&lt;wchar_t&gt;,<br />
1&gt; _Pmf=std::ctype&lt;wchar_t&gt;::_Elem (__thiscall std::ctype&lt;wchar_t&gt;::</em> const )(std::ctype&lt;wchar_t&gt;::_Elem) const,<br />
1&gt; _Farg0=std::tr1::reference_wrapper&lt;const std::ctype&lt;wchar_t&gt;&gt;,<br />
1&gt; _Farg1=wchar_t,<br />
1&gt; _Ty=const std::ctype&lt;wchar_t&gt;<br />
1&gt; ]<br />
... weitere Fehler gleicher Art ...</p>
</blockquote>
<pre><code class="language-cpp">static std::wstring tolower(std::wstring string)
{
    const std::ctype&lt;wchar_t&gt;&amp; ct = std::use_facet&lt;std::ctype&lt;wchar_t&gt; &gt;(std::locale());
    std::transform(string.begin(), string.end(), string.begin(), std::tr1::bind(&amp;std::ctype&lt;wchar_t&gt;::tolower, std::tr1::cref(ct), std::tr1::placeholders::_1));
    return string;
}
</code></pre>
<p>Meiner Meinung nach müsste das für den Compiler (auch mit altem Toolset) kein Problem sein. Weiss jmd. Rat?</p>
<p>Simon</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1962206</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1962206</guid><dc:creator><![CDATA[theta]]></dc:creator><pubDate>Wed, 06 Oct 2010 16:08:04 GMT</pubDate></item><item><title><![CDATA[Reply to Compiler Fehler VS2010 &#x2F; VS2008, std::tr1::bind on Wed, 06 Oct 2010 17:24:13 GMT]]></title><description><![CDATA[<p>Das ist ein Defekt in VC2008s TR1-Implementation, siehe <a href="http://connect.microsoft.com/VisualStudio/feedback/details/379968/std-tr1-ref-doesnt-actually-does-the-job" rel="nofollow">http://connect.microsoft.com/VisualStudio/feedback/details/379968/std-tr1-ref-doesnt-actually-does-the-job</a> .</p>
<p>Mit boost::cref funktioniert es, also kannst du ggf. darauf ausweichen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1962234</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1962234</guid><dc:creator><![CDATA[seldon]]></dc:creator><pubDate>Wed, 06 Oct 2010 17:24:13 GMT</pubDate></item><item><title><![CDATA[Reply to Compiler Fehler VS2010 &#x2F; VS2008, std::tr1::bind on Thu, 07 Oct 2010 06:06:05 GMT]]></title><description><![CDATA[<p>Vielen Danke für die Info.<br />
Simon</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1962392</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1962392</guid><dc:creator><![CDATA[theta]]></dc:creator><pubDate>Thu, 07 Oct 2010 06:06:05 GMT</pubDate></item></channel></rss>