<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 Forums - Tech Off - Should I make namespace std global?</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Forums/rss"></atom:link>
	<image>
		<url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
		<title>Channel 9 Forums - Tech Off - Should I make namespace std global?</title>
		<link>http://channel9.msdn.com/Forums</link>
	</image>
	<description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
	<link>http://channel9.msdn.com/Forums</link>
	<language>en</language>
	<pubDate>Thu, 20 Jun 2013 11:00:00 GMT</pubDate>
	<lastBuildDate>Thu, 20 Jun 2013 11:00:00 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<c9:totalResults>3</c9:totalResults>
	<c9:pageCount>-3</c9:pageCount>
	<c9:pageSize>-1</c9:pageSize>
	<item>
		<title>Tech Off - Should I make namespace std global?</title>
		<description><![CDATA[<p>Okay, so if I use <b>using namespace std;</b>, does that mean the program will compile everything named under
<b>namespace std</b>? Many people recommend not to make the namespace std global, but some say it doesn't matter. But I usually do the second way, typing explicitly using::string, using::cout......until I read the newly released book from Andrei Alexandrescu
 (highly repected person in the field), the book named C&#43;&#43; coding standard. (ISBN: 0-321-11358-6)<br>
<br>
Here is a quote from the book: <br>
But here's the common trap: Many people think that <b>using</b> declarations issued at namespace level (for example, using N::Widge) are safe. They are not. They are at least as dangerous, and in a subtler and more insidious way.<br>
<br>
After reading this, I was thinking, am I doing the right way? So I thought I would ask people here how they are doing it.
<br>
<br>
<code><br>
<font size="3">// Implementation file<br>
#include &lt;iostream&gt;<br>
using namespace std;<br>
<br>
int main()<br>
{<br>
// code<br>
return 0;<br>
}<br>
</font></code><br>
<br>
<font size="3">or should I do this:<br>
<br>
</font><code><br>
<font size="3">// Implemenation file<br>
#include &lt;iostream&gt;<br>
using::cout;<br>
using::cin;<br>
using::endl;<br>
<br>
int main()<br>
{<br>
//code<br>
<br>
return 0;<br>
}<br>
</font></code></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/26983-Should-I-make-namespace-std-global/26983#26983</link>
		<pubDate>Fri, 05 Nov 2004 07:17:28 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/26983-Should-I-make-namespace-std-global/26983#26983</guid>
		<dc:creator>TheProgrammer</dc:creator>
		<slash:comments>3</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/TheProgrammer/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Should I make namespace std global?</title>
		<description><![CDATA[<p>I usually do a &quot;using namespace std&quot; in source files (unless they are really small)&nbsp;and std::* in header files.&nbsp; It doesn't compile anything extra, just makes your life easier.&nbsp; The only way it can be bad is if you have custom classes with the same names
 as the STL classes, in which case you will have to fully use std::* to declare one.<br>
</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/26983-Should-I-make-namespace-std-global/b018f05ba297484f88c29dea0115f91e#b018f05ba297484f88c29dea0115f91e</link>
		<pubDate>Fri, 05 Nov 2004 12:05:16 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/26983-Should-I-make-namespace-std-global/b018f05ba297484f88c29dea0115f91e#b018f05ba297484f88c29dea0115f91e</guid>
		<dc:creator>Cory Nelson</dc:creator>
		<slash:comments>3</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/PhrostByte/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Should I make namespace std global?</title>
		<description><![CDATA[<p>I don't much care one way or the other in source files.<br>
<br>
Never put <strong>any</strong> using declarations in header files though, since you force whomever will later use those headers to have their global namespace polluted. I'm working on an application whose source I've inherited, and there &quot;using namespace std;&quot;
 was put in the precompiled header, so either I'm stuck with it for any sourcefiles I add, or I have to change a few hundred existing source files.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/26983-Should-I-make-namespace-std-global/b98dd55ed9864ab081199dea0115f94b#b98dd55ed9864ab081199dea0115f94b</link>
		<pubDate>Sun, 07 Nov 2004 11:45:37 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/26983-Should-I-make-namespace-std-global/b98dd55ed9864ab081199dea0115f94b#b98dd55ed9864ab081199dea0115f94b</guid>
		<dc:creator>Sven Groot</dc:creator>
		<slash:comments>3</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Sven Groot/Discussions/RSS</wfw:commentRss>
	</item>
</channel>
</rss>