Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2001-06-22 17:40:28

From: <rwgk_at_[hidden]>
> In the header file boost/utility.hpp, leading underscores are
> are used for some variable names:
> template <class A, class B>
> class tied {
> public:
> inline tied(A& a, B& b) : _a(a), _b(b) { }
> /...
> protected:
> A& _a;
> B& _b;
> };
> I always thought that identifiers with leading underscores
> should not be used. Is this only true for identifieres
> in the global namespace?

The safe rule is not to use leading underscores, although I
think those above are technically OK, if useless. Global names []

1 Certain sets of names and function signatures are always reserved to
  the implementation:

  --Each name that contains a double underscore __) or begins with an
    underscore followed by an uppercase letter (_lex.key_) is reserved
    to the implementation for any use.

  --Each name that begins with an underscore is reserved to the imple-
    mentation for use as a name in the global namespace.22)

  22) Such names are also reserved in namespace ::std (

Boost list run by bdawes at, gregod at, cpdaniel at, john at