This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 'using namespace std' before including header


On Wed, 2006-10-18 at 13:08 -0700, Geoffrey Keating wrote:
> As far as I can tell from the C++ standard, there is no implicit
> predeclaration of the 'std' namespace.  Thus, a file that contains
> 
> using namespace std;
> 
> requires an error, due to [basic.lookup.unqual] paragraph 1, "If no
> declaration is found, the program is ill-formed" or possibly
> [lib.using.headers], "A translation unit ... shall include the header
> lexically before the first reference to any of the entities it
> declares or first defines in that translation unit."

This problem is now recorded as PR 29556.

Thanks,
Andrew Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]