<?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[Template Argument von Template Parameter herausfinden]]></title><description><![CDATA[<p>Hallo,<br />
ich programmiere mir gerade eine Bibliothek, die unter Anderem allgemeine gewöhnliche Differentialgleichungen numerisch mittels verschiedener Verfahren lösen können soll. Um damit dann Bewegungsgleichungen lösen zu können, möchte ich das symplektische Euler-Verfahren implementieren, da dieses ja weitgehend keinen (bzw. einen recht geringen) Energy-Drift erzeugt. Bis jetzt habe ich die üblichen klassischen Verfahren ohne Probleme mittels Template-Klassen implementiert, beim symplektischen Euler habe ich jedoch ein syntaktisches Problem mit den Template-Klassen.</p>
<p>Zunächst habe ich eine abstrakte Klasse &quot;ODE&quot; erstellt. Diese ist das Basisinterface von der jede Differentialgleichung erben muss. Sie ist als Funktor designt.</p>
<pre><code>template&lt;typename T&gt;
// Class for reprisentation of ODEs of the type y' = f(t, y)
struct ODE
{
	ODE() {};
	virtual ~ODE(void) {};

	// Return the right hand side of the ODE y' = f(t, y)
	virtual T operator()(double t, T&amp; y) = 0;
};
</code></pre>
<p>Wie zu erkennen, bildet diese Klasse nur eine Differentialgleichung 1. Ordnung ab. Ich muss aber auch Differentialgleichungen 2. Ordnung lösen können. Der mathematische Ansatz ist dabei wie folgt:<br />
Eine Differentialgleichung der Form <span class="katex"><span class="katex-mathml"><math><semantics><mrow><msup><mi>y</mi><mrow><mo>(</mo><mi>n</mi><mo>)</mo></mrow></msup><mo>(</mo><mi>t</mi><mo>)</mo><mo>=</mo><mi>F</mi><mo>(</mo><mi>t</mi><mo separator="true">,</mo><mi>y</mi><mo separator="true">,</mo><msup><mi>y</mi><mrow><mi mathvariant="normal">′</mi></mrow></msup><mo separator="true">,</mo><msup><mi>y</mi><mrow><mi mathvariant="normal">′</mi><mi mathvariant="normal">′</mi></mrow></msup><mo separator="true">,</mo><mi mathvariant="normal">.</mi><mi mathvariant="normal">.</mi><mi mathvariant="normal">.</mi><mo separator="true">,</mo><msup><mi>y</mi><mrow><mo>(</mo><mi>n</mi><mo>−</mo><mn>1</mn><mo>)</mo></mrow></msup><mo>)</mo></mrow><annotation encoding="application/x-tex">y^{(n)}(t) = F(t, y, y&#x27;,y&#x27;&#x27;,...,y^{(n-1)})</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:0.8879999999999999em;"></span><span class="strut bottom" style="height:1.138em;vertical-align:-0.25em;"></span><span class="base textstyle uncramped"><span class="mord"><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="vlist"><span style="top:-0.363em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord scriptstyle uncramped"><span class="mopen">(</span><span class="mord mathit">n</span><span class="mclose">)</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mopen">(</span><span class="mord mathit">t</span><span class="mclose">)</span><span class="mrel">=</span><span class="mord mathit" style="margin-right:0.13889em;">F</span><span class="mopen">(</span><span class="mord mathit">t</span><span class="mpunct">,</span><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="mpunct">,</span><span class="mord"><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="vlist"><span style="top:-0.363em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord scriptstyle uncramped"><span class="mord mathrm">′</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mpunct">,</span><span class="mord"><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="vlist"><span style="top:-0.363em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord scriptstyle uncramped"><span class="mord mathrm">′</span><span class="mord mathrm">′</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mpunct">,</span><span class="mord mathrm">.</span><span class="mord mathrm">.</span><span class="mord mathrm">.</span><span class="mpunct">,</span><span class="mord"><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="vlist"><span style="top:-0.363em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord scriptstyle uncramped"><span class="mopen">(</span><span class="mord mathit">n</span><span class="mbin">−</span><span class="mord mathrm">1</span><span class="mclose">)</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mclose">)</span></span></span></span> kann immer in ein System von Differentialgleichungen 1. Ordnung überführt werden. Für eine Differentialgleichung 2. Ordnung sähe das dann wie folgt aus:</p>
<p><span class="katex-display"><span class="katex"><span class="katex-mathml"><math><semantics><mrow><msup><mi>u</mi><mrow><mi mathvariant="normal">′</mi></mrow></msup><mo>(</mo><mi>t</mi><mo>)</mo><mo>=</mo><mfrac><mrow><mrow><mi mathvariant="normal">d</mi></mrow></mrow><mrow><mrow><mi mathvariant="normal">d</mi></mrow><mi>t</mi></mrow></mfrac><mrow><mo fence="true">(</mo><mtable><mtr><mtd><mrow><mi>y</mi><mo>(</mo><mi>t</mi><mo>)</mo></mrow></mtd></mtr><mtr><mtd><mrow><msup><mi>y</mi><mrow><mi mathvariant="normal">′</mi></mrow></msup><mo>(</mo><mi>t</mi><mo>)</mo></mrow></mtd></mtr></mtable><mo fence="true">)</mo></mrow><mo>=</mo><mrow><mo fence="true">(</mo><mtable><mtr><mtd><mrow><mi>f</mi><mo>(</mo><mi>t</mi><mo separator="true">,</mo><mi>y</mi><mo separator="true">,</mo><msup><mi>y</mi><mrow><mi mathvariant="normal">′</mi></mrow></msup><mo>)</mo></mrow></mtd></mtr><mtr><mtd><mrow><mi>g</mi><mo>(</mo><mi>t</mi><mo separator="true">,</mo><mi>y</mi><mo separator="true">,</mo><msup><mi>y</mi><mrow><mi mathvariant="normal">′</mi></mrow></msup><mo>)</mo></mrow></mtd></mtr></mtable><mo fence="true">)</mo></mrow><mo>=</mo><mi mathvariant="normal">Φ</mi><mo>(</mo><mi>t</mi><mo separator="true">,</mo><mi>y</mi><mo separator="true">,</mo><msup><mi>y</mi><mrow><mi mathvariant="normal">′</mi></mrow></msup><mo>)</mo></mrow><annotation encoding="application/x-tex">u&#x27;(t) = \frac{\mathrm{d}}{\mathrm{d}t}  
\begin{pmatrix}  
y(t)\\  
y&#x27;(t)  
\end{pmatrix}  
=  
\begin{pmatrix}  
f(t, y, y&#x27;)\\  
g(t, y, y&#x27;)  
\end{pmatrix}  
= \Phi(t, y, y&#x27;)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:1.45em;"></span><span class="strut bottom" style="height:2.40003em;vertical-align:-0.95003em;"></span><span class="base displaystyle textstyle uncramped"><span class="mord"><span class="mord mathit">u</span><span class="vlist"><span style="top:-0.413em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord scriptstyle uncramped"><span class="mord mathrm">′</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mopen">(</span><span class="mord mathit">t</span><span class="mclose">)</span><span class="mrel">=</span><span class="mord reset-textstyle displaystyle textstyle uncramped"><span class="sizing reset-size5 size5 reset-textstyle textstyle uncramped nulldelimiter"></span><span class="mfrac"><span class="vlist"><span style="top:0.686em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle textstyle cramped"><span class="mord textstyle cramped"><span class="mord textstyle cramped"><span class="mord mathrm">d</span></span><span class="mord mathit">t</span></span></span></span><span style="top:-0.22999999999999998em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle textstyle uncramped frac-line"></span></span><span style="top:-0.677em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle textstyle uncramped"><span class="mord textstyle uncramped"><span class="mord textstyle uncramped"><span class="mord mathrm">d</span></span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="sizing reset-size5 size5 reset-textstyle textstyle uncramped nulldelimiter"></span></span><span class="minner displaystyle textstyle uncramped"><span class="style-wrap reset-textstyle textstyle uncramped" style="top:0em;"><span class="delimsizing size3">(</span></span><span class="mord"><span class="mtable"><span class="col-align-c"><span class="vlist"><span style="top:-0.6099999999999999em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="mord displaystyle textstyle uncramped"><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="mopen">(</span><span class="mord mathit">t</span><span class="mclose">)</span></span></span><span style="top:0.5900000000000003em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="mord displaystyle textstyle uncramped"><span class="mord"><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="vlist"><span style="top:-0.413em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord scriptstyle uncramped"><span class="mord mathrm">′</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mopen">(</span><span class="mord mathit">t</span><span class="mclose">)</span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span></span></span><span class="style-wrap reset-textstyle textstyle uncramped" style="top:0em;"><span class="delimsizing size3">)</span></span></span><span class="mrel">=</span><span class="minner displaystyle textstyle uncramped"><span class="style-wrap reset-textstyle textstyle uncramped" style="top:0em;"><span class="delimsizing size3">(</span></span><span class="mord"><span class="mtable"><span class="col-align-c"><span class="vlist"><span style="top:-0.6099999999999999em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="mord displaystyle textstyle uncramped"><span class="mord mathit" style="margin-right:0.10764em;">f</span><span class="mopen">(</span><span class="mord mathit">t</span><span class="mpunct">,</span><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="mpunct">,</span><span class="mord"><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="vlist"><span style="top:-0.413em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord scriptstyle uncramped"><span class="mord mathrm">′</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mclose">)</span></span></span><span style="top:0.5900000000000003em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="mord displaystyle textstyle uncramped"><span class="mord mathit" style="margin-right:0.03588em;">g</span><span class="mopen">(</span><span class="mord mathit">t</span><span class="mpunct">,</span><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="mpunct">,</span><span class="mord"><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="vlist"><span style="top:-0.413em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord scriptstyle uncramped"><span class="mord mathrm">′</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mclose">)</span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span></span></span><span class="style-wrap reset-textstyle textstyle uncramped" style="top:0em;"><span class="delimsizing size3">)</span></span></span><span class="mrel">=</span><span class="mord mathrm">Φ</span><span class="mopen">(</span><span class="mord mathit">t</span><span class="mpunct">,</span><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="mpunct">,</span><span class="mord"><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="vlist"><span style="top:-0.413em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord scriptstyle uncramped"><span class="mord mathrm">′</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mclose">)</span></span></span></span></span></p>
<p>Es bleibt also nurnoch eine vektorielle Differentialgleichung 1. Ordnung zu lösen oder salopp: Eine Differentialgleichung 2. Ordnung <em>ist</em> eine vektorielle Differentialgleichung 1. Ordnung! Dieses Verhalteung wurde in folgender Klasse implementiert:</p>
<pre><code>template&lt;typename T&gt;
// Class for representation of a second order ODEs of the type
// y' = f(t, y, y'), y'' = g(t, y, y'), which is the same as:
// (y', y'') = u(t, (y, y'))
struct SecondOrderODE : public ODE&lt;Vector&lt;2, T&gt;&gt;
{
	SecondOrderODE() {};
	virtual ~SecondOrderODE() {};

	// Return the value of the first derivative
	virtual T f(double t, Vector&lt;2, T&gt;&amp; y) = 0;
	// Return the value fo the second derivative
	virtual T g(double t, Vector&lt;2, T&gt;&amp; y) = 0;

	// Return the value of the first derivative of the system vector
	Vector&lt;2, T&gt; operator()(double t, Vector&lt;2, T&gt;&amp; y)
	{
		return Vector&lt;2, T&gt;(f(t, y), g(t, y));
	}
};
</code></pre>
<p><code>Vector&lt;int N, typename T&gt;</code> ist hierbei eine naive Implementierung eines <em>N</em>-dimensionalen Vektors mit Elementen vom Typ <em>T</em>.</p>
<p>Somit können nun gewöhnliche Differentialgleichungen 1. und 2. Ordnung jeglicher Art abgebildet werden. Als nächstes war der Integrator zu implementieren. Auch hierfür wurde zunächst eine abstrakte Klasse angelegt, welche allgemein einen Integrator beschreibt:</p>
<pre><code>template&lt;typename T&gt;
class Integrator
{
public:
	Integrator(ODE&lt;T&gt;* ode, double t, double h, T* y)
		: ode_(ode), t_(t), h_(h), y_(y) {};
	virtual ~Integrator() {};

	// Calculate the required values of the ODE
	virtual void calculate() = 0;
	// Apply the calculated step. Call calculate() before calling apply()!
	virtual void apply() = 0;

protected:
	// The ODE which should be integrated
	ODE&lt;T&gt;* ode_;

	// Size of a single step
	double h_;
	// Current value of the variable
	double t_;
	// Current value of the integrand
	T* y_;
};
</code></pre>
<p>Nun das Problemkind: der symplektische Euler. Der symplektische Euler ist zwar eine <em>ODE</em>, lässt jedoch aber nur Differentialgleichungen 2. Ordnung zu. Das Problem ist folgendes:<br />
<code>SecondOrderODE</code> ist eine <code>ODE&lt;Vector&lt;2,T&gt;&gt;</code><br />
Der <code>Integrator</code> erhält dann als Template Argument folglich auch <code>Vector&lt;2,T&gt;</code> , da er ja eine ODE über diesem Typ lösen soll.<br />
Mein Problem fängt nun schon beim Konstruktor von <code>IntegratorSymplecticEuler</code> an, denn ich bräuchte etwas in der Art:</p>
<pre><code>template&lt;class V = Vector&lt;2, T&gt;&gt;
class IntegratorSymplecticEuler : Integrator&lt;V&gt;
{
public:
	IntegratorSymplecticEuler(SecondOrderODE&lt;T&gt; *ode, double t, double h, V* y) {}
};
</code></pre>
<p>Ich muss also bestimmen können welchen Datentyp die Vektoren beinhalten.<br />
Hier weiß ich jedoch nicht, wie dies zu formulieren ist. So wie angegeben kompiliert es ja offensichtlich nicht. Oder hat evtl. jemand eine Idee dies schlauer auf eine andere Art zu lösen?</p>
<p>Danke schonmal und habt bitte ein bisschen Nachsicht, das ist mein erster Beitrag hier und ich bin noch einigermaßen blutiger Anfänger <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/326659/template-argument-von-template-parameter-herausfinden</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Jul 2026 17:41:45 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/326659.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 29 Jun 2014 13:19:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Template Argument von Template Parameter herausfinden on Sun, 29 Jun 2014 13:19:17 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich programmiere mir gerade eine Bibliothek, die unter Anderem allgemeine gewöhnliche Differentialgleichungen numerisch mittels verschiedener Verfahren lösen können soll. Um damit dann Bewegungsgleichungen lösen zu können, möchte ich das symplektische Euler-Verfahren implementieren, da dieses ja weitgehend keinen (bzw. einen recht geringen) Energy-Drift erzeugt. Bis jetzt habe ich die üblichen klassischen Verfahren ohne Probleme mittels Template-Klassen implementiert, beim symplektischen Euler habe ich jedoch ein syntaktisches Problem mit den Template-Klassen.</p>
<p>Zunächst habe ich eine abstrakte Klasse &quot;ODE&quot; erstellt. Diese ist das Basisinterface von der jede Differentialgleichung erben muss. Sie ist als Funktor designt.</p>
<pre><code>template&lt;typename T&gt;
// Class for reprisentation of ODEs of the type y' = f(t, y)
struct ODE
{
	ODE() {};
	virtual ~ODE(void) {};

	// Return the right hand side of the ODE y' = f(t, y)
	virtual T operator()(double t, T&amp; y) = 0;
};
</code></pre>
<p>Wie zu erkennen, bildet diese Klasse nur eine Differentialgleichung 1. Ordnung ab. Ich muss aber auch Differentialgleichungen 2. Ordnung lösen können. Der mathematische Ansatz ist dabei wie folgt:<br />
Eine Differentialgleichung der Form <span class="katex"><span class="katex-mathml"><math><semantics><mrow><msup><mi>y</mi><mrow><mo>(</mo><mi>n</mi><mo>)</mo></mrow></msup><mo>(</mo><mi>t</mi><mo>)</mo><mo>=</mo><mi>F</mi><mo>(</mo><mi>t</mi><mo separator="true">,</mo><mi>y</mi><mo separator="true">,</mo><msup><mi>y</mi><mrow><mi mathvariant="normal">′</mi></mrow></msup><mo separator="true">,</mo><msup><mi>y</mi><mrow><mi mathvariant="normal">′</mi><mi mathvariant="normal">′</mi></mrow></msup><mo separator="true">,</mo><mi mathvariant="normal">.</mi><mi mathvariant="normal">.</mi><mi mathvariant="normal">.</mi><mo separator="true">,</mo><msup><mi>y</mi><mrow><mo>(</mo><mi>n</mi><mo>−</mo><mn>1</mn><mo>)</mo></mrow></msup><mo>)</mo></mrow><annotation encoding="application/x-tex">y^{(n)}(t) = F(t, y, y&#x27;,y&#x27;&#x27;,...,y^{(n-1)})</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:0.8879999999999999em;"></span><span class="strut bottom" style="height:1.138em;vertical-align:-0.25em;"></span><span class="base textstyle uncramped"><span class="mord"><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="vlist"><span style="top:-0.363em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord scriptstyle uncramped"><span class="mopen">(</span><span class="mord mathit">n</span><span class="mclose">)</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mopen">(</span><span class="mord mathit">t</span><span class="mclose">)</span><span class="mrel">=</span><span class="mord mathit" style="margin-right:0.13889em;">F</span><span class="mopen">(</span><span class="mord mathit">t</span><span class="mpunct">,</span><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="mpunct">,</span><span class="mord"><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="vlist"><span style="top:-0.363em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord scriptstyle uncramped"><span class="mord mathrm">′</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mpunct">,</span><span class="mord"><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="vlist"><span style="top:-0.363em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord scriptstyle uncramped"><span class="mord mathrm">′</span><span class="mord mathrm">′</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mpunct">,</span><span class="mord mathrm">.</span><span class="mord mathrm">.</span><span class="mord mathrm">.</span><span class="mpunct">,</span><span class="mord"><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="vlist"><span style="top:-0.363em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord scriptstyle uncramped"><span class="mopen">(</span><span class="mord mathit">n</span><span class="mbin">−</span><span class="mord mathrm">1</span><span class="mclose">)</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mclose">)</span></span></span></span> kann immer in ein System von Differentialgleichungen 1. Ordnung überführt werden. Für eine Differentialgleichung 2. Ordnung sähe das dann wie folgt aus:</p>
<p><span class="katex-display"><span class="katex"><span class="katex-mathml"><math><semantics><mrow><msup><mi>u</mi><mrow><mi mathvariant="normal">′</mi></mrow></msup><mo>(</mo><mi>t</mi><mo>)</mo><mo>=</mo><mfrac><mrow><mrow><mi mathvariant="normal">d</mi></mrow></mrow><mrow><mrow><mi mathvariant="normal">d</mi></mrow><mi>t</mi></mrow></mfrac><mrow><mo fence="true">(</mo><mtable><mtr><mtd><mrow><mi>y</mi><mo>(</mo><mi>t</mi><mo>)</mo></mrow></mtd></mtr><mtr><mtd><mrow><msup><mi>y</mi><mrow><mi mathvariant="normal">′</mi></mrow></msup><mo>(</mo><mi>t</mi><mo>)</mo></mrow></mtd></mtr></mtable><mo fence="true">)</mo></mrow><mo>=</mo><mrow><mo fence="true">(</mo><mtable><mtr><mtd><mrow><mi>f</mi><mo>(</mo><mi>t</mi><mo separator="true">,</mo><mi>y</mi><mo separator="true">,</mo><msup><mi>y</mi><mrow><mi mathvariant="normal">′</mi></mrow></msup><mo>)</mo></mrow></mtd></mtr><mtr><mtd><mrow><mi>g</mi><mo>(</mo><mi>t</mi><mo separator="true">,</mo><mi>y</mi><mo separator="true">,</mo><msup><mi>y</mi><mrow><mi mathvariant="normal">′</mi></mrow></msup><mo>)</mo></mrow></mtd></mtr></mtable><mo fence="true">)</mo></mrow><mo>=</mo><mi mathvariant="normal">Φ</mi><mo>(</mo><mi>t</mi><mo separator="true">,</mo><mi>y</mi><mo separator="true">,</mo><msup><mi>y</mi><mrow><mi mathvariant="normal">′</mi></mrow></msup><mo>)</mo></mrow><annotation encoding="application/x-tex">u&#x27;(t) = \frac{\mathrm{d}}{\mathrm{d}t}  
\begin{pmatrix}  
y(t)\\  
y&#x27;(t)  
\end{pmatrix}  
=  
\begin{pmatrix}  
f(t, y, y&#x27;)\\  
g(t, y, y&#x27;)  
\end{pmatrix}  
= \Phi(t, y, y&#x27;)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="strut" style="height:1.45em;"></span><span class="strut bottom" style="height:2.40003em;vertical-align:-0.95003em;"></span><span class="base displaystyle textstyle uncramped"><span class="mord"><span class="mord mathit">u</span><span class="vlist"><span style="top:-0.413em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord scriptstyle uncramped"><span class="mord mathrm">′</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mopen">(</span><span class="mord mathit">t</span><span class="mclose">)</span><span class="mrel">=</span><span class="mord reset-textstyle displaystyle textstyle uncramped"><span class="sizing reset-size5 size5 reset-textstyle textstyle uncramped nulldelimiter"></span><span class="mfrac"><span class="vlist"><span style="top:0.686em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle textstyle cramped"><span class="mord textstyle cramped"><span class="mord textstyle cramped"><span class="mord mathrm">d</span></span><span class="mord mathit">t</span></span></span></span><span style="top:-0.22999999999999998em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle textstyle uncramped frac-line"></span></span><span style="top:-0.677em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle textstyle uncramped"><span class="mord textstyle uncramped"><span class="mord textstyle uncramped"><span class="mord mathrm">d</span></span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="sizing reset-size5 size5 reset-textstyle textstyle uncramped nulldelimiter"></span></span><span class="minner displaystyle textstyle uncramped"><span class="style-wrap reset-textstyle textstyle uncramped" style="top:0em;"><span class="delimsizing size3">(</span></span><span class="mord"><span class="mtable"><span class="col-align-c"><span class="vlist"><span style="top:-0.6099999999999999em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="mord displaystyle textstyle uncramped"><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="mopen">(</span><span class="mord mathit">t</span><span class="mclose">)</span></span></span><span style="top:0.5900000000000003em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="mord displaystyle textstyle uncramped"><span class="mord"><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="vlist"><span style="top:-0.413em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord scriptstyle uncramped"><span class="mord mathrm">′</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mopen">(</span><span class="mord mathit">t</span><span class="mclose">)</span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span></span></span><span class="style-wrap reset-textstyle textstyle uncramped" style="top:0em;"><span class="delimsizing size3">)</span></span></span><span class="mrel">=</span><span class="minner displaystyle textstyle uncramped"><span class="style-wrap reset-textstyle textstyle uncramped" style="top:0em;"><span class="delimsizing size3">(</span></span><span class="mord"><span class="mtable"><span class="col-align-c"><span class="vlist"><span style="top:-0.6099999999999999em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="mord displaystyle textstyle uncramped"><span class="mord mathit" style="margin-right:0.10764em;">f</span><span class="mopen">(</span><span class="mord mathit">t</span><span class="mpunct">,</span><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="mpunct">,</span><span class="mord"><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="vlist"><span style="top:-0.413em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord scriptstyle uncramped"><span class="mord mathrm">′</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mclose">)</span></span></span><span style="top:0.5900000000000003em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="mord displaystyle textstyle uncramped"><span class="mord mathit" style="margin-right:0.03588em;">g</span><span class="mopen">(</span><span class="mord mathit">t</span><span class="mpunct">,</span><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="mpunct">,</span><span class="mord"><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="vlist"><span style="top:-0.413em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord scriptstyle uncramped"><span class="mord mathrm">′</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mclose">)</span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span></span></span><span class="style-wrap reset-textstyle textstyle uncramped" style="top:0em;"><span class="delimsizing size3">)</span></span></span><span class="mrel">=</span><span class="mord mathrm">Φ</span><span class="mopen">(</span><span class="mord mathit">t</span><span class="mpunct">,</span><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="mpunct">,</span><span class="mord"><span class="mord mathit" style="margin-right:0.03588em;">y</span><span class="vlist"><span style="top:-0.413em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span><span class="reset-textstyle scriptstyle uncramped"><span class="mord scriptstyle uncramped"><span class="mord mathrm">′</span></span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;">​</span></span>​</span></span></span><span class="mclose">)</span></span></span></span></span></p>
<p>Es bleibt also nurnoch eine vektorielle Differentialgleichung 1. Ordnung zu lösen oder salopp: Eine Differentialgleichung 2. Ordnung <em>ist</em> eine vektorielle Differentialgleichung 1. Ordnung! Dieses Verhalteung wurde in folgender Klasse implementiert:</p>
<pre><code>template&lt;typename T&gt;
// Class for representation of a second order ODEs of the type
// y' = f(t, y, y'), y'' = g(t, y, y'), which is the same as:
// (y', y'') = u(t, (y, y'))
struct SecondOrderODE : public ODE&lt;Vector&lt;2, T&gt;&gt;
{
	SecondOrderODE() {};
	virtual ~SecondOrderODE() {};

	// Return the value of the first derivative
	virtual T f(double t, Vector&lt;2, T&gt;&amp; y) = 0;
	// Return the value fo the second derivative
	virtual T g(double t, Vector&lt;2, T&gt;&amp; y) = 0;

	// Return the value of the first derivative of the system vector
	Vector&lt;2, T&gt; operator()(double t, Vector&lt;2, T&gt;&amp; y)
	{
		return Vector&lt;2, T&gt;(f(t, y), g(t, y));
	}
};
</code></pre>
<p><code>Vector&lt;int N, typename T&gt;</code> ist hierbei eine naive Implementierung eines <em>N</em>-dimensionalen Vektors mit Elementen vom Typ <em>T</em>.</p>
<p>Somit können nun gewöhnliche Differentialgleichungen 1. und 2. Ordnung jeglicher Art abgebildet werden. Als nächstes war der Integrator zu implementieren. Auch hierfür wurde zunächst eine abstrakte Klasse angelegt, welche allgemein einen Integrator beschreibt:</p>
<pre><code>template&lt;typename T&gt;
class Integrator
{
public:
	Integrator(ODE&lt;T&gt;* ode, double t, double h, T* y)
		: ode_(ode), t_(t), h_(h), y_(y) {};
	virtual ~Integrator() {};

	// Calculate the required values of the ODE
	virtual void calculate() = 0;
	// Apply the calculated step. Call calculate() before calling apply()!
	virtual void apply() = 0;

protected:
	// The ODE which should be integrated
	ODE&lt;T&gt;* ode_;

	// Size of a single step
	double h_;
	// Current value of the variable
	double t_;
	// Current value of the integrand
	T* y_;
};
</code></pre>
<p>Nun das Problemkind: der symplektische Euler. Der symplektische Euler ist zwar eine <em>ODE</em>, lässt jedoch aber nur Differentialgleichungen 2. Ordnung zu. Das Problem ist folgendes:<br />
<code>SecondOrderODE</code> ist eine <code>ODE&lt;Vector&lt;2,T&gt;&gt;</code><br />
Der <code>Integrator</code> erhält dann als Template Argument folglich auch <code>Vector&lt;2,T&gt;</code> , da er ja eine ODE über diesem Typ lösen soll.<br />
Mein Problem fängt nun schon beim Konstruktor von <code>IntegratorSymplecticEuler</code> an, denn ich bräuchte etwas in der Art:</p>
<pre><code>template&lt;class V = Vector&lt;2, T&gt;&gt;
class IntegratorSymplecticEuler : Integrator&lt;V&gt;
{
public:
	IntegratorSymplecticEuler(SecondOrderODE&lt;T&gt; *ode, double t, double h, V* y) {}
};
</code></pre>
<p>Ich muss also bestimmen können welchen Datentyp die Vektoren beinhalten.<br />
Hier weiß ich jedoch nicht, wie dies zu formulieren ist. So wie angegeben kompiliert es ja offensichtlich nicht. Oder hat evtl. jemand eine Idee dies schlauer auf eine andere Art zu lösen?</p>
<p>Danke schonmal und habt bitte ein bisschen Nachsicht, das ist mein erster Beitrag hier und ich bin noch einigermaßen blutiger Anfänger <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2406191</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2406191</guid><dc:creator><![CDATA[S1cknessGER]]></dc:creator><pubDate>Sun, 29 Jun 2014 13:19:17 GMT</pubDate></item><item><title><![CDATA[Reply to Template Argument von Template Parameter herausfinden on Sun, 29 Jun 2014 13:32:13 GMT]]></title><description><![CDATA[<p>Ich habe gerade mal zwei Zeilen deines Problems gelesen und glaube jetzt schon zu wissen, dass du eine partielle Spezialisierung brauchst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2406195</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2406195</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Sun, 29 Jun 2014 13:32:13 GMT</pubDate></item><item><title><![CDATA[Reply to Template Argument von Template Parameter herausfinden on Sun, 29 Jun 2014 13:35:45 GMT]]></title><description><![CDATA[<pre><code>// Primärtemplate
template&lt;class T&gt; class IntegratorSymplecticEuler;

// Die partielle Spezialisierung - die Template-Argumente (hier T) werden per function template argument deduction deduziert
template&lt;class T&gt;
class IntegratorSymplecticEuler&lt;Vector&lt;2, T&gt;&gt; : Integrator&lt;Vector&lt;2, T&gt;&gt;
{
public:
    IntegratorSymplecticEuler(SecondOrderODE&lt;T&gt; *ode, double t, double h, Vector&lt;2, T&gt;* y) {}
};
</code></pre>
<p>?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2406197</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2406197</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Sun, 29 Jun 2014 13:35:45 GMT</pubDate></item><item><title><![CDATA[Reply to Template Argument von Template Parameter herausfinden on Sun, 29 Jun 2014 13:42:26 GMT]]></title><description><![CDATA[<pre><code>template&lt;class T, class V = Vector&lt;2, T&gt;&gt;
class IntegratorSymplecticEuler : Integrator&lt;V&gt;
{
public:
    IntegratorSymplecticEuler(SecondOrderODE&lt;T&gt; *ode, double t, double h, V* y) {}
};
</code></pre>
<p>Vielleicht meinst du <a href="http://ideone.com/gYhEY6" rel="nofollow">sowas</a>?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2406201</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2406201</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Sun, 29 Jun 2014 13:42:26 GMT</pubDate></item><item><title><![CDATA[Reply to Template Argument von Template Parameter herausfinden on Sun, 29 Jun 2014 13:45:11 GMT]]></title><description><![CDATA[<p>Vielen Dank für die schnelle Antwort. Der Mechanismus der &quot;function template argument deduction&quot; war mir bist jetzt nicht bekannt. Könntest du mir schnell in ganz gröber Zügen erklären was der genau macht? Bin ja wie gesagt noch Anfänger <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> Aber damit kompiliert mein Test zumindest schonmal. Das ist sehr gut.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2406202</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2406202</guid><dc:creator><![CDATA[S1cknessGER]]></dc:creator><pubDate>Sun, 29 Jun 2014 13:45:11 GMT</pubDate></item><item><title><![CDATA[Reply to Template Argument von Template Parameter herausfinden on Sun, 29 Jun 2014 13:51:19 GMT]]></title><description><![CDATA[<p>Skym0sh0 schrieb:</p>
<blockquote>
<pre><code>template&lt;class T, class V = Vector&lt;2, T&gt;&gt;
class IntegratorSymplecticEuler : Integrator&lt;V&gt;
{
public:
    IntegratorSymplecticEuler(SecondOrderODE&lt;T&gt; *ode, double t, double h, V* y) {}
};
</code></pre>
<p>Vielleicht meinst du <a href="http://ideone.com/gYhEY6" rel="nofollow">sowas</a>?</p>
</blockquote>
<p>Deine Lösung funktioniert zwar, bringt mich aber leider nicht zum Ziel.<br />
<code>IntegratorSymplecticEuler</code> soll ja immernoch <code>ODE</code> s vom Typ z.B. <code>ODE&lt;Vector&lt;2, double&gt;&gt;</code> lösen.<br />
Ich müsste somit Aufrufe wie folgt machen:</p>
<pre><code>Integrator&lt;Vector&lt;2, double&gt;&gt;* i = IntegratorSymplecticEuler&lt;Vector&lt;2,double&gt;&gt;(...)
</code></pre>
<p>Danke trotzdem <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2406205</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2406205</guid><dc:creator><![CDATA[S1cknessGER]]></dc:creator><pubDate>Sun, 29 Jun 2014 13:51:19 GMT</pubDate></item><item><title><![CDATA[Reply to Template Argument von Template Parameter herausfinden on Tue, 01 Jul 2014 16:35:42 GMT]]></title><description><![CDATA[<p>S1cknessGER schrieb:</p>
<blockquote>
<p>Der Mechanismus der &quot;function template argument deduction&quot; war mir bist jetzt nicht bekannt.</p>
</blockquote>
<p>Das ist nicht der Mechanismus der hinter dem Code steckt. Der heißt nämlich &quot;Partielle Spezialisierung&quot; (engl. <em>partial specialization</em>). Partielle Spezialisierungen werden eingesetzt, um bei Klassentemplates Template-Argumente herauszufiltern.</p>
<p>Partielle Spezialisierungen können auf eine Reihe von Template-Argumenten zutreffen:</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;type_traits&gt;

template &lt;typename T, typename = void&gt;
struct A
{
	static void f() { std::cout &lt;&lt; &quot;A - Primaertemplate\n&quot;; }
};

template &lt;typename T&gt;
struct A&lt;T, typename std::enable_if&lt;std::is_integral&lt;T&gt;::value&gt;::type&gt;
{
	static void f() { std::cout &lt;&lt; &quot;A - Partielle Spezialisierung\n&quot;; }
};

int main()
{
	A&lt;float&gt;::f();
	A&lt;int&gt;::f();
	A&lt;long&gt;::f();
}
</code></pre>
<p>Wenn du eine Spezialisierung eines Templates - wie <code>A&lt;long&gt;</code> - zum ersten Mal anforderst, dann muss der Compiler die Spezialisierung dieses Templates <em>instantiieren</em>.<br />
Nun muss er aber erst herausfinden, welches Template er für diesen Prozess - genannt Template-Instantiierung (engl. <em>template instantiation</em>) - nimmt.</p>
<p>Wenn es nur ein Primärtemplate gibt, dann nutzt er das Primärtemplate.<br />
Wenn es irgendeine explizite Spezialisierung gibt, die genau die gleichen Argumente hat wie die gegebene Spezialisierung, dann wird diese genommen.<br />
Gibt es aber ein oder mehrere partielle Spezialisierungen, werden imaginäre Funktionstemplates verwendet, um zu entscheiden aus welchem Template nun die Spezialisierung instantiiert wird.</p>
<p>In obigem Fall wäre das nur eines, also</p>
<pre><code>template &lt;typename T&gt;
void f( A&lt;T, typename std::enable_if&lt;std::is_integral&lt;T&gt;::value&gt;::type&gt; );
</code></pre>
<p>Nun wird zuerst überprüft ob die partielle Spezialisierung überhaupt ein match ist (sprich zutrifft), indem man ein Argument vom Typ <code>A&lt;int&gt;</code> an dieses imaginäre Funktionstemplate übergibt.<br />
Falls die Deduzierung der Template-Argumente fehlschlägt, wird also das Primärtemplate genommen.<br />
Falls die Deduzierung aber erfolgreich ist, dann sind wir fertig und instantiieren die Spezialisierung mit der partiellen Spezialisierung (und zwar mit den deduzierten Argumenten als Template-Argumenten - hier sind die deduzierten Argumente die selben, <code>int</code> ).</p>
<p>Nun gibt es einen Mechanismus in der Template-Meta-Progammierung, der im Beispielcode zu demonstrativen Zwecken eingesetzt wird - <a href="http://en.wikipedia.org/wiki/Substitution_failure_is_not_an_error" rel="nofollow">SFINAE</a>. Es geht aber über den Rand dieses Posts hinaus, letzteres auch noch zu erklären.<br />
Wichtig ist nur, dass die Deduzierung erfolgreich ist und die (einzige) partielle Spezialisierung ausgewählt wird.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2406258</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2406258</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Tue, 01 Jul 2014 16:35:42 GMT</pubDate></item><item><title><![CDATA[Reply to Template Argument von Template Parameter herausfinden on Tue, 01 Jul 2014 20:39:52 GMT]]></title><description><![CDATA[<p>Danke, das hat mir geholfen.<br />
Partielle Spezialisierung kannte ich zum Teil schon, aber noch nicht sooo gut.<br />
Ich denke demnächst gibt's dann erstmal ein wenig Literatur zu Templates <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2406574</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2406574</guid><dc:creator><![CDATA[S1cknessGER]]></dc:creator><pubDate>Tue, 01 Jul 2014 20:39:52 GMT</pubDate></item></channel></rss>