<?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[Funktionsobjekte - operator() statisch?]]></title><description><![CDATA[<p>Hallo,</p>
<p>könnte bei Funktionsobjekten der operator() auch als statisch deklariert werden?<br />
Ungefähr so:</p>
<pre><code class="language-cpp">struct myFunc : public std::unary_function&lt; void, int &gt; {
    static void operator() (int i) { /* Irgendwas machen */ }
}; // myFunc
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/261937/funktionsobjekte-operator-statisch</link><generator>RSS for Node</generator><lastBuildDate>Sun, 06 Sep 2026 23:40:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/261937.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 25 Feb 2010 18:43:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Funktionsobjekte - operator() statisch? on Thu, 25 Feb 2010 18:43:17 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>könnte bei Funktionsobjekten der operator() auch als statisch deklariert werden?<br />
Ungefähr so:</p>
<pre><code class="language-cpp">struct myFunc : public std::unary_function&lt; void, int &gt; {
    static void operator() (int i) { /* Irgendwas machen */ }
}; // myFunc
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1861460</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1861460</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 25 Feb 2010 18:43:17 GMT</pubDate></item><item><title><![CDATA[Reply to Funktionsobjekte - operator() statisch? on Thu, 25 Feb 2010 18:48:22 GMT]]></title><description><![CDATA[<p>Was spricht gegen eine ganz normale Funktion?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1861463</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1861463</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Thu, 25 Feb 2010 18:48:22 GMT</pubDate></item><item><title><![CDATA[Reply to Funktionsobjekte - operator() statisch? on Thu, 25 Feb 2010 18:59:41 GMT]]></title><description><![CDATA[<p>drakon schrieb:</p>
<blockquote>
<p>Was spricht gegen eine ganz normale Funktion?</p>
</blockquote>
<p>Meine Funktion ist sehr komplex und braucht jede Menge Hilfsfunktionen (damit sie übersichtlicher bleibt).<br />
Da dacht ich mir es sei von Vorteil alles in einen Funktor zu packen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1861468</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1861468</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 25 Feb 2010 18:59:41 GMT</pubDate></item><item><title><![CDATA[Reply to Funktionsobjekte - operator() statisch? on Thu, 25 Feb 2010 19:18:21 GMT]]></title><description><![CDATA[<p>daersc schrieb:</p>
<blockquote>
<p>könnte bei Funktionsobjekten der operator() auch als statisch deklariert werden?</p>
</blockquote>
<p>Nein. Du hast außerdem die Typ-Parameter für unary_function vertauscht.</p>
<p>Dein Code wird auch nicht übersichtlicher, wenn Du etwas, was normale Funktionen hätten sein können, in einem struct verpackst. (!)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1861474</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1861474</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Thu, 25 Feb 2010 19:18:21 GMT</pubDate></item></channel></rss>