<?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[std::bind mit VS2010]]></title><description><![CDATA[<p>Hallo zusammen,<br />
ich verstehe das Verhalten von std::bind (mit Visuals Studio 2010) nicht.<br />
Folgender Code</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;functional&gt;
using namespace std;

void foo(int a, int b)
{
  cout&lt;&lt;&quot;a: &quot;&lt;&lt;a&lt;&lt;&quot;, b :&quot;&lt;&lt;b&lt;&lt;endl;
}

int main()
{
  function&lt;void(int)&gt; f = bind(foo, placeholders::_1, 1);
  f(2);
  return 0;
}
</code></pre>
<p>liefert bei mir wider erwarten &quot;a:2, b:1&quot;, es wurde also das zweite Argument statt das erste gebunden.<br />
Ist das normales Verhalten? Wie würde ich denn das erste Argument binden?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/319291/std-bind-mit-vs2010</link><generator>RSS for Node</generator><lastBuildDate>Sat, 25 Jul 2026 20:13:27 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/319291.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 13 Aug 2013 12:47:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to std::bind mit VS2010 on Tue, 13 Aug 2013 12:47:58 GMT]]></title><description><![CDATA[<p>Hallo zusammen,<br />
ich verstehe das Verhalten von std::bind (mit Visuals Studio 2010) nicht.<br />
Folgender Code</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;functional&gt;
using namespace std;

void foo(int a, int b)
{
  cout&lt;&lt;&quot;a: &quot;&lt;&lt;a&lt;&lt;&quot;, b :&quot;&lt;&lt;b&lt;&lt;endl;
}

int main()
{
  function&lt;void(int)&gt; f = bind(foo, placeholders::_1, 1);
  f(2);
  return 0;
}
</code></pre>
<p>liefert bei mir wider erwarten &quot;a:2, b:1&quot;, es wurde also das zweite Argument statt das erste gebunden.<br />
Ist das normales Verhalten? Wie würde ich denn das erste Argument binden?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2345511</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2345511</guid><dc:creator><![CDATA[C14]]></dc:creator><pubDate>Tue, 13 Aug 2013 12:47:58 GMT</pubDate></item><item><title><![CDATA[Reply to std::bind mit VS2010 on Tue, 13 Aug 2013 13:07:22 GMT]]></title><description><![CDATA[<blockquote>
<p>Ist das normales Verhalten?</p>
</blockquote>
<p>Ja.</p>
<blockquote>
<p>Wie würde ich denn das erste Argument binden?</p>
</blockquote>
<p>So:</p>
<pre><code>function&lt;void(int)&gt; f = bind(foo, 1, placeholders::_1);
</code></pre>
<p>Verstehst du es jetzt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2345517</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2345517</guid><dc:creator><![CDATA[Sone]]></dc:creator><pubDate>Tue, 13 Aug 2013 13:07:22 GMT</pubDate></item><item><title><![CDATA[Reply to std::bind mit VS2010 on Tue, 13 Aug 2013 13:34:07 GMT]]></title><description><![CDATA[<p>Sone schrieb:</p>
<blockquote>
<p>Verstehst du es jetzt?</p>
</blockquote>
<p>Ja, danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2345527</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2345527</guid><dc:creator><![CDATA[C14]]></dc:creator><pubDate>Tue, 13 Aug 2013 13:34:07 GMT</pubDate></item></channel></rss>