$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-03-11 17:37:24
Rob Stewart wrote:
> From: "Jonathan Turkanis" <technews_at_[hidden]>
>> Rob Stewart wrote:
>>> From: "Jonathan Turkanis" <technews_at_[hidden]>
>>
>>>> I don't want to get distracted by the issue of whether the fact
>>>> that an operator is defined in a friend declaration can be
>>>> considered an implementation detail. My real question whether I
>>>> can document the basic_character interface, broadly conceived, as
>>>> simpler than it really is, and add a note explaining what's
>>>> missing. I don't want a simple library element to require a huge
>>>> section of documentation.
>>>
>>> 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
> 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
explicitly namespace qualified. Therefore users can tell the difference between
a friend function defined in class and a function defined outside the class.
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 think this problem is trivial enough that we've alreday spent to much time on
it. ;-)
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!
Jonathan