On 28 Jan 2000, Lars Gullik Bjønnes wrote:
> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
>
> | >>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
> |
> | Lars> mmm...I want to do that...but so far I have not dared.
> | Lars> Eventually "using" should not be used in headers at all, and as
> | Lars> little as possible in filescope.
> |
> | You mean we'll be forced to add std:: in front of all STL identifiers?
> | Yuck.
>
> No, but when I have a small func it is much more convenient to use the
> std:: prefix.
>
> For longer funcs and inline code in headers "using" should be used in
> the function body.
>
> Only as an exception should a "using" be used at filescope.
> (and never in headers)
Surely it's perfectly acceptable to have
using std::vector;
at the top of a file (in filescope).
That simply says 'in this file, I wish to introduce the type 'std::vector'
into my namespace'. That's directly comparable to
extern int g_happy;
which means 'in this file, I wish to introduce the variable g_happy into
my namespace'.
Jules
/----------------+-------------------------------+---------------------\
| Jelibean aka | [EMAIL PROTECTED] | 6 Evelyn Rd |
| Jules aka | [EMAIL PROTECTED] | Richmond, Surrey |
| Julian Bean | [EMAIL PROTECTED] | TW9 2TF *UK* |
+----------------+-------------------------------+---------------------+
| War doesn't demonstrate who's right... just who's left. |
| When privacy is outlawed... only the outlaws have privacy. |
\----------------------------------------------------------------------/