<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Why C++ Supports both Class and Typename for Type Parameters</title><link>http://blogs.msdn.com/slippman/archive/2004/08/11/212768.aspx</link><description>Recently, someone asked me why we support both class and typename within C++ to indicate a type parameter since the keywords do not hold any platform significance – for example, class is not meant to suggest a native type nor is typename meant to suggest</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Why C++ Supports both Class and Typename for Type Parameters</title><link>http://blogs.msdn.com/slippman/archive/2004/08/11/212768.aspx#213172</link><pubDate>Thu, 12 Aug 2004 02:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:213172</guid><dc:creator>Nish</dc:creator><description>Cool - thanks for the info :-)</description></item><item><title>re: Why C++ Supports both Class and Typename for Type Parameters</title><link>http://blogs.msdn.com/slippman/archive/2004/08/11/212768.aspx#213324</link><pubDate>Thu, 12 Aug 2004 08:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:213324</guid><dc:creator>Gavin Greig</dc:creator><description>So is there ever a good reason to use &amp;quot;class&amp;quot; rather than &amp;quot;typename&amp;quot; for a type parameter, or is it purely for backwards compatibility?</description></item><item><title>re: Why C++ Supports both Class and Typename for Type Parameters</title><link>http://blogs.msdn.com/slippman/archive/2004/08/11/212768.aspx#213512</link><pubDate>Thu, 12 Aug 2004 14:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:213512</guid><dc:creator>stan lippman</dc:creator><description>is there ever a `good' reason? no, if you feel the need to converge on a single naming convention, typename is clearer, i believe, to those fresh to the language. however, if you analyze the necessary keystrokes, typename spans the entire keyboard and so is not just longer to type, but requires greater facility -- of course, that is said tongue-in-cheek.&lt;br&gt;</description></item><item><title>re: Why C++ Supports both Class and Typename for Type Parameters</title><link>http://blogs.msdn.com/slippman/archive/2004/08/11/212768.aspx#214052</link><pubDate>Fri, 13 Aug 2004 10:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:214052</guid><dc:creator>Gavin Greig</dc:creator><description>:-) Good answer. Thanks.</description></item><item><title>re: Why C++ Supports both Class and Typename for Type Parameters</title><link>http://blogs.msdn.com/slippman/archive/2004/08/11/212768.aspx#214323</link><pubDate>Fri, 13 Aug 2004 19:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:214323</guid><dc:creator>Michael Kleber</dc:creator><description>I just had to use typename for the &amp;quot;unfortunate obsession with expressions&amp;quot; sense and I still don't understand why.  Consider the following moronic way to find the length of a vector:&lt;br&gt;&lt;br&gt;using namespace std;&lt;br&gt;template &amp;lt;class T&amp;gt; int vcount(vector&amp;lt;T&amp;gt; v) {&lt;br&gt;  int i;&lt;br&gt;  typename vector&amp;lt;T&amp;gt;::iterator vi;&lt;br&gt;  for(i=0,vi=v.begin(); vi!=v.end(); i++,vi++)&lt;br&gt;    ;&lt;br&gt;  return(i);&lt;br&gt;}&lt;br&gt;&lt;br&gt;Much to my surprise, g++ 3.4.0 didn't like vector&amp;lt;T&amp;gt;::iterator until I put a typename before it.  (Looks like older g++'s think it's just fine.)&lt;br&gt;&lt;br&gt;I remain baffled, but at least typename was there for me!&lt;br&gt;&lt;br&gt;</description></item><item><title>T??? kh??a typename trong C++ &amp;laquo; Vietnamese Developers&amp;#8217; Blog</title><link>http://blogs.msdn.com/slippman/archive/2004/08/11/212768.aspx#5800930</link><pubDate>Wed, 31 Oct 2007 19:47:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5800930</guid><dc:creator>T??? kh??a typename trong C++ « Vietnamese Developers’ Blog</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://openandfree.wordpress.com/2007/10/31/t%e1%bb%ab-khoa-typename-trong-c/"&gt;http://openandfree.wordpress.com/2007/10/31/t%e1%bb%ab-khoa-typename-trong-c/&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>