<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: 14.6 &#8212; Partial template specialization</title>
	<atom:link href="http://www.learncpp.com/cpp-tutorial/146-partial-template-specialization/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.learncpp.com/cpp-tutorial/146-partial-template-specialization/</link>
	<description></description>
	<lastBuildDate>Tue, 07 Feb 2012 12:30:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: vikas</title>
		<link>http://www.learncpp.com/cpp-tutorial/146-partial-template-specialization/comment-page-1/#comment-96855</link>
		<dc:creator>vikas</dc:creator>
		<pubDate>Thu, 19 Jan 2012 06:41:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=208#comment-96855</guid>
		<description>Hii Alex
s there any concept of WRAPPER CLASS in C++, if yes then please give any idia how to use it. If u hav prepared any tutorial then please mention ur link.

thank in advance</description>
		<content:encoded><![CDATA[<p>Hii Alex<br />
s there any concept of WRAPPER CLASS in C++, if yes then please give any idia how to use it. If u hav prepared any tutorial then please mention ur link.</p>
<p>thank in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sandyleo26</title>
		<link>http://www.learncpp.com/cpp-tutorial/146-partial-template-specialization/comment-page-1/#comment-95538</link>
		<dc:creator>sandyleo26</dc:creator>
		<pubDate>Wed, 08 Jun 2011 17:40:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=208#comment-95538</guid>
		<description>Hi, c++ standard doesn&#039;t allow partial specification for function template. Partial specification only available for class. So the PrintBufferString example is not a partial specification. It&#039;s function template OVERLOAD which mimic the behavior of partial specification. Please correct this.</description>
		<content:encoded><![CDATA[<p>Hi, c++ standard doesn&#8217;t allow partial specification for function template. Partial specification only available for class. So the PrintBufferString example is not a partial specification. It&#8217;s function template OVERLOAD which mimic the behavior of partial specification. Please correct this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mccp13</title>
		<link>http://www.learncpp.com/cpp-tutorial/146-partial-template-specialization/comment-page-1/#comment-95418</link>
		<dc:creator>mccp13</dc:creator>
		<pubDate>Fri, 06 May 2011 11:42:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=208#comment-95418</guid>
		<description>please help, how would the Print function in Buffer class be implemented as template specialization for double.. would it be something like :

template
void Buffer::Print()
{
for( int nCount=0 ; nCount &lt; nSize ; ++nCount )
std::cout &lt;&lt; std::scientific &lt;&lt; m_atBuffer[nCount] &lt;&lt; std::endl;
}

??</description>
		<content:encoded><![CDATA[<p>please help, how would the Print function in Buffer class be implemented as template specialization for double.. would it be something like :</p>
<p>template<br />
void Buffer::Print()<br />
{<br />
for( int nCount=0 ; nCount &lt; nSize ; ++nCount )<br />
std::cout &lt;&lt; std::scientific &lt;&lt; m_atBuffer[nCount] &lt;&lt; std::endl;<br />
}</p>
<p>??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Janis</title>
		<link>http://www.learncpp.com/cpp-tutorial/146-partial-template-specialization/comment-page-1/#comment-94519</link>
		<dc:creator>Janis</dc:creator>
		<pubDate>Fri, 22 Oct 2010 15:29:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=208#comment-94519</guid>
		<description>Is &quot;int&quot; a misspelling here?
&lt;pre&gt;template&lt;int nSize&gt;
void PrintBufferString(Buffer&lt;char, nSize&gt; &amp;rcBuf)
{
    std::cout &lt;&lt; rcBuf.GetBuffer() &lt;&lt; std::endl;
}&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Is &#8220;int&#8221; a misspelling here?</p>
<pre>template&lt;int nSize&gt;
void PrintBufferString(Buffer&lt;char, nSize&gt; &amp;rcBuf)
{
    std::cout &lt;&lt; rcBuf.GetBuffer() &lt;&lt; std::endl;
}</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: george</title>
		<link>http://www.learncpp.com/cpp-tutorial/146-partial-template-specialization/comment-page-1/#comment-88690</link>
		<dc:creator>george</dc:creator>
		<pubDate>Mon, 19 Jul 2010 07:32:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=208#comment-88690</guid>
		<description>Is this &lt;pre&gt;m_tValue = new T(*tValue);&lt;/pre&gt; an implicit initialization for the value pointed by m_tValue? In other words, is it equivalent to:
&lt;pre&gt;m_tValue = new T;
*m_tValue=*tValue;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Is this
<pre>m_tValue = new T(*tValue);</pre>
<p> an implicit initialization for the value pointed by m_tValue? In other words, is it equivalent to:</p>
<pre>m_tValue = new T;
*m_tValue=*tValue;</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: george</title>
		<link>http://www.learncpp.com/cpp-tutorial/146-partial-template-specialization/comment-page-1/#comment-88591</link>
		<dc:creator>george</dc:creator>
		<pubDate>Sat, 17 Jul 2010 17:29:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=208#comment-88591</guid>
		<description>I don&#039;t understand why this function
&lt;pre&gt;void PrintBufferString(Buffer&lt;char, 10&gt; &amp;rcBuf)&lt;!--formatted--&gt;&lt;/pre&gt;
should take only a literal, and not an integer argument like this:
&lt;pre&gt;void PrintBufferString(Buffer&lt;char, int&gt; &amp;rcBuf)&lt;!--formatted--&gt;&lt;/pre&gt;?
Is it because function templates can not take an expression parameter (in this case &lt;i&gt;int&lt;/i&gt;)? But then &lt;pre&gt;Buffer&lt;char, int&gt;&lt;!--formatted--&gt;&lt;/pre&gt; is just a parameter type to the function, and should be OK.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t understand why this function</p>
<pre>void PrintBufferString(Buffer&lt;char, 10&gt; &amp;rcBuf)<!--formatted--></pre>
<p>should take only a literal, and not an integer argument like this:</p>
<pre>void PrintBufferString(Buffer&lt;char, int&gt; &amp;rcBuf)<!--formatted--></pre>
<p>?<br />
Is it because function templates can not take an expression parameter (in this case <i>int</i>)? But then
<pre>Buffer&lt;char, int&gt;<!--formatted--></pre>
<p> is just a parameter type to the function, and should be OK.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: C++ Tutorial and Online Ebook</title>
		<link>http://www.learncpp.com/cpp-tutorial/146-partial-template-specialization/comment-page-1/#comment-87438</link>
		<dc:creator>C++ Tutorial and Online Ebook</dc:creator>
		<pubDate>Wed, 30 Jun 2010 01:13:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=208#comment-87438</guid>
		<description>[...] 14.6 Partial template specialization [...]</description>
		<content:encoded><![CDATA[<p>[...] 14.6 Partial template specialization [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: User</title>
		<link>http://www.learncpp.com/cpp-tutorial/146-partial-template-specialization/comment-page-1/#comment-61015</link>
		<dc:creator>User</dc:creator>
		<pubDate>Mon, 18 May 2009 05:34:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=208#comment-61015</guid>
		<description>in the &quot;Partial template specialization for pointers&quot; section, the point of specializing a version for pointer type was to deal with the issue of shallow/deep copy on constructor call. However you could imagine the following (pointer to pointer):

&lt;pre&gt;
int x = 7;
int *y = &amp;x;
Storage&lt;int**&gt; cIntPtrPtrStorage(&amp;y);
&lt;!--formatted--&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>in the &#8220;Partial template specialization for pointers&#8221; section, the point of specializing a version for pointer type was to deal with the issue of shallow/deep copy on constructor call. However you could imagine the following (pointer to pointer):</p>
<pre>
int x = 7;
int *y = &amp;x;
Storage&lt;int**&gt; cIntPtrPtrStorage(&amp;y);
<!--formatted--></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: mohammad</title>
		<link>http://www.learncpp.com/cpp-tutorial/146-partial-template-specialization/comment-page-1/#comment-30271</link>
		<dc:creator>mohammad</dc:creator>
		<pubDate>Sun, 19 Oct 2008 21:17:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=208#comment-30271</guid>
		<description>in the first code:
&lt;pre&gt;
int&amp; operator[](int nIndex)   
{   
    return m_atBuffer[nIndex];   
}   
&lt;!--formatted--&gt;&lt;/pre&gt;
shouldn&#039;t the return value be T&amp; instead of int&amp; ?

[ Yes, definitely.  Thanks for the catch.  -Alex ]</description>
		<content:encoded><![CDATA[<p>in the first code:</p>
<pre>
int&amp; operator[](int nIndex)
{
    return m_atBuffer[nIndex];
}
<!--formatted--></pre>
<p>shouldn&#8217;t the return value be T&amp; instead of int&amp; ?</p>
<p>[ Yes, definitely.  Thanks for the catch.  -Alex ]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Learn C++ - &#187; 15.1 &#8212; Introduction to exceptions</title>
		<link>http://www.learncpp.com/cpp-tutorial/146-partial-template-specialization/comment-page-1/#comment-29220</link>
		<dc:creator>Learn C++ - &#187; 15.1 &#8212; Introduction to exceptions</dc:creator>
		<pubDate>Sun, 05 Oct 2008 19:04:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/?p=208#comment-29220</guid>
		<description>[...] 14.6 &#8212; Partial template specialization  [...]</description>
		<content:encoded><![CDATA[<p>[...] 14.6 &#8212; Partial template specialization  [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

