Mail Archives: djgpp/1999/08/12/14:44:42
Eli Zaretskii wrote:
>
> On Thu, 5 Aug 1999, dnult wrote:
>
> > int main() {
> > using std::copy;
> > using std::cout;
> > ...
> >
> > The compiler complains "In function int main(), parse error before 'using'".
> > If I comment out the namespace specifiers the code compiles fine, (but
> > doesn't run).
>
> GCC 2.8.1 doesn't support namespaces, AFAIK.
The only support for namespaces in GCC 2.8.1 is that compiler
compiles 'using namespace std;' as no-op.
If you want full namespace support, EGCS 1.1.x and GCC 2.95
implements it. But standard C++ library of those compiler
hasn't put in namespace std. It will be so in GCC 3.0.
However, you can try to use flags -fhonor-std -DHONOR-STD
(can't recall correctly) and see if it puts library in namespace
std.
Laurynas Biveinis
- Raw text -