friend from global namespace
Roman Belenov
roman@nstl.nnov.ru
Fri Feb 4 05:59:00 GMT 2000
In the following code fragment, gcc gives an error on the line with
comment:
2.cc:7: parse error before `('
Visual C++ 6.0 works Ok (and friend declaration works as intended).
Is it a gcc bug ? If not, how can I declare friend from global
namespace ?
------------------------------------------------------------------
class G {};
G f();
namespace N {
G f();
class L {
friend G ( ::f() ); /////
};
};
------------------------------------------------------------------
--
With regards, Roman.
More information about the Gcc
mailing list