"using namespace" within a class declaration?

From: Jacek Dziedzic (jacek__NOSPAM___at_janowo.net)
Date: 04/28/04


Date: Wed, 28 Apr 2004 23:53:10 +0200


   Is it valid to use a "using namespace foo" (as opposed to
using foo::bar which I'm sure is legal) within a class
declaration? My compiler rejects it, but I've been told it's
valid.

   Can anyone please confirm or deny?

TIA,
- J.



Relevant Pages

  • Re: "using namespace" within a class declaration?
    ... My compiler rejects it, ... > TIA, ... Both Comeau online and VC++ 7.1 reject both and say that using declarations ...
    (comp.lang.cpp)
  • Re: Question about multiple files
    ... No. extern just means: The actual definition is somewhere else. ... the compiler can differentiate between declaration and definition just ... > declaration it finds and in this way can I write code expecting it to be ... When the compiler reaches the line foo(); ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Question about multiple files
    ... but say I declare with extern. ... > the compiler can differentiate between declaration and definition just ... >> declaration it finds and in this way can I write code expecting it to be ... > When the compiler reaches the line foo(); ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Cpp Considered Harmful
    ... >> programming language, the compiler, the IDE, the libraries, etc. ... source file, the implementation shall locate the declaration, (and ... to name one of the defining source files on the command line that initiates ... The counterpart to this in Java is accomplished using the following: ...
    (comp.lang.cpp)
  • Re: Program Fails When Parameter Fixed Constants are Changed (F77) ??
    ... ZBRENT is a function as opposed to a subroutine. ... I don't know how to tell the compiler DCPVAL is a fun and not a sub. ... That is not the same thing as being valid f77. ... declared the name of the External as real throughout, one declaration ...
    (comp.lang.fortran)