<?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[Zugriff auf templated using innerhalb eines templates aus anderem template]]></title><description><![CDATA[<p>Hallo,</p>
<p>Folgender Code:</p>
<pre><code>template &lt;typename T&gt;
struct X
{
	template &lt;typename U&gt;
	using Y = U;
};

template &lt;typename T&gt;
struct Other
{
	using Type = ::template X&lt;T&gt;::Y&lt;T&gt;; // ???
};

using ForceInstantiation = Other&lt;int&gt;::Type;
</code></pre>
<p>Wie greife ich bei der kommentierten Zeile auf das nested typedef zu? Ich habe es sowohl mit template, typename, als auch ohne Keyword probiert und keines der drei funktioniert.</p>
<p><a href="http://ideone.com/P78eOy" rel="nofollow">http://ideone.com/P78eOy</a><br />
<a href="http://ideone.com/buzrzl" rel="nofollow">http://ideone.com/buzrzl</a><br />
<a href="http://ideone.com/wLwukF" rel="nofollow">http://ideone.com/wLwukF</a></p>
<p>Gruesse<br />
Der Kellerautomat</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/325410/zugriff-auf-templated-using-innerhalb-eines-templates-aus-anderem-template</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 11:47:06 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/325410.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 30 Apr 2014 12:53:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zugriff auf templated using innerhalb eines templates aus anderem template on Wed, 30 Apr 2014 12:53:30 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Folgender Code:</p>
<pre><code>template &lt;typename T&gt;
struct X
{
	template &lt;typename U&gt;
	using Y = U;
};

template &lt;typename T&gt;
struct Other
{
	using Type = ::template X&lt;T&gt;::Y&lt;T&gt;; // ???
};

using ForceInstantiation = Other&lt;int&gt;::Type;
</code></pre>
<p>Wie greife ich bei der kommentierten Zeile auf das nested typedef zu? Ich habe es sowohl mit template, typename, als auch ohne Keyword probiert und keines der drei funktioniert.</p>
<p><a href="http://ideone.com/P78eOy" rel="nofollow">http://ideone.com/P78eOy</a><br />
<a href="http://ideone.com/buzrzl" rel="nofollow">http://ideone.com/buzrzl</a><br />
<a href="http://ideone.com/wLwukF" rel="nofollow">http://ideone.com/wLwukF</a></p>
<p>Gruesse<br />
Der Kellerautomat</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2396861</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2396861</guid><dc:creator><![CDATA[Kellerautomat]]></dc:creator><pubDate>Wed, 30 Apr 2014 12:53:30 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf templated using innerhalb eines templates aus anderem template on Wed, 30 Apr 2014 13:10:16 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">using Type = typename ::X&lt;T&gt;::template Y&lt;T&gt;;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2396865</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2396865</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Wed, 30 Apr 2014 13:10:16 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf templated using innerhalb eines templates aus anderem template on Wed, 30 Apr 2014 15:13:28 GMT]]></title><description><![CDATA[<p>Falls du übrigens eine Instantiierung erzwingen willst, nimm eine explizite Instantiierung:</p>
<pre><code>template class Other&lt;int&gt;;
</code></pre>
<p>X ist kein abhängiger Bezeichner, darum muss dort kein <code>template</code> hin, jedoch selbstverständlich für Y, und weil Y auch ein Funktionstemplate (oder seit C++14 auch Variablentemplate) sein könnte, muss da noch ein <code>typename</code> sein (§14.6/2 gilt für <strong>alle</strong> abhängigen Namen).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2396876</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2396876</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Wed, 30 Apr 2014 15:13:28 GMT</pubDate></item><item><title><![CDATA[Reply to Zugriff auf templated using innerhalb eines templates aus anderem template on Wed, 30 Apr 2014 15:18:24 GMT]]></title><description><![CDATA[<p>Danke. Wer hat sich diesen Mist eigentlich ausgedacht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2396877</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2396877</guid><dc:creator><![CDATA[Kellerautomat]]></dc:creator><pubDate>Wed, 30 Apr 2014 15:18:24 GMT</pubDate></item></channel></rss>