Boost logo

Boost :

From: Rob Stewart (stewart_at_[hidden])
Date: 2005-03-14 15:57:39


From: "Jonathan Turkanis" <technews_at_[hidden]>
> Rob Stewart wrote:
> > From: "Jonathan Turkanis" <technews_at_[hidden]>
> >>>
> >>> I'm not sure you got my point. I don't think you can avoid
> >>> documenting the full interface of basic_character, including the
> >>> namespace scope operators.
> >>
> >> But if they're defined as friends, there
>
> they're

Quite.

> > not technically namespace
> >> scope operators. I guess I can define them at namespace scope just
> >> to avoid this problem.
> >
> > If they are friends defined in a class template, they are, by
> > definition, namespace scope functions.
>
> I guess I mispoke; it's true that they are namespace scope operatrors; however,
> they do not introduce new names into the namespace, so the operators cannot be

Huh? 14.5.3/1: "the name shall be an unqualified id that declares (or
redeclares) an ordinary (nontemplate) function."

> explicitly namespace qualified. Therefore users can tell the difference between
> a friend function defined in class and a function defined outside the class.

Again, huh? Am I missing something?

> As a result, if I document them as defined out of class, but implement them in
> class, the synopsis you suggest would still be fictional. That's why I said that
> perhaps I should just implement them out of class to avoid complicating the
> docs.

I don't think that's the case.

> I think this problem is trivial enough that we've alreday spent to much time on
> it. ;-)

No doubt.

> You've already helped me a great deal. I'm hoping I can get your input on some
> more important questions which will be coming up soon. Thanks again!

Great!

-- 
Rob Stewart                           stewart_at_[hidden]
Software Engineer                     http://www.sig.com
Susquehanna International Group, LLP  using std::disclaimer;

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk