<?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[decltype tut nicht]]></title><description><![CDATA[<p>hi<br />
<a href="http://ideone.com/Lr4mp" rel="nofollow">http://ideone.com/Lr4mp</a> tut nicht (fehler sind auch dort). alternativen ohne c++0x?</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/289331/decltype-tut-nicht</link><generator>RSS for Node</generator><lastBuildDate>Wed, 19 Aug 2026 07:34:00 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/289331.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 02 Jul 2011 16:49:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to decltype tut nicht on Sat, 02 Jul 2011 16:49:44 GMT]]></title><description><![CDATA[<p>hi<br />
<a href="http://ideone.com/Lr4mp" rel="nofollow">http://ideone.com/Lr4mp</a> tut nicht (fehler sind auch dort). alternativen ohne c++0x?</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2087802</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2087802</guid><dc:creator><![CDATA[lol_of_lolcraft]]></dc:creator><pubDate>Sat, 02 Jul 2011 16:49:44 GMT</pubDate></item><item><title><![CDATA[Reply to decltype tut nicht on Sat, 02 Jul 2011 16:55:59 GMT]]></title><description><![CDATA[<p>Allgemeingültige Alternativen ohne C++0x gibts nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2087806</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2087806</guid><dc:creator><![CDATA[audacia]]></dc:creator><pubDate>Sat, 02 Jul 2011 16:55:59 GMT</pubDate></item><item><title><![CDATA[Reply to decltype tut nicht on Sat, 02 Jul 2011 16:57:49 GMT]]></title><description><![CDATA[<p>Die automatische Typdetektion funktioniert nur bei Template-Funktionen, nicht bei Klassen. Alternativen fallen mir auch nicht wirklich ein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2087807</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2087807</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Sat, 02 Jul 2011 16:57:49 GMT</pubDate></item><item><title><![CDATA[Reply to decltype tut nicht on Sat, 02 Jul 2011 17:08:12 GMT]]></title><description><![CDATA[<p>Suchst Du nach Boost.TypeOf ?</p>
<p>Achtung decltype != typeof</p>
<p>typeof liefert den Typ eines Ausdrucks. Ein Ausdruck hat nie einen Referenztypen. decltype liefert den &quot;deklarierten Typ&quot; (Rückgabetyp der Funktion oder deklarierter Typ einer Variablen).</p>
<p>Mit C++0x kann man sich TYPEOF mit decltype so bauen:</p>
<pre><code class="language-cpp">#include &lt;type_traits&gt;
#define TYPEOF(x) typename std::decay&lt;(x)&gt;::type
</code></pre>
<p>(das nur am Rande)</p>
<p>Viele Compiler bieten eine Erweiterung an, um den Typ eines Ausdrucks zu erfragen. Boost.TypeOf bietet dafür eine einheitliche Schnittstelle. Verwendest Du einen Compiler, der diese Erweiterungen nicht besitzt oder nicht unterstützt wird, ist man bei Boost.TypeOf gezwungen, benutzerdefinierte Typen manuell zu registrieren, damit TypeOf auch mit diesen Typen funktioniert -- wenn ich das richtig in Erinnerung habe.</p>
<p>Es gibt aber auch andere Tricks, die keine Compiler-Erweiterung erfordern, siehe Boost.ForEach.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2087814</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2087814</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Sat, 02 Jul 2011 17:08:12 GMT</pubDate></item></channel></rss>