Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-09-14 15:51:43


Thorsten Ottosen wrote:
> David Abrahams <dave <at> boost-consulting.com> writes:
>
>>
>> Thorsten Ottosen <nesotto <at> cs.aau.dk> writes:
>
>>> The reference docs state exactly what the functions returns.
>>
>> Yes, but the presentation is unprecedented. It's also a bit
>> confusing, because until you understand how to read the tables, each
>> function appears to have multiple return values.
>
> then what about the following:
>
> Returns:
>
> x.first if x is an std::pair
> x if x is an array
> range_begin(x) if range_begin() can be found by ADL
> x.begin() otherwise
>
> ?

I have exactly the same situation in Iostreams. I give each function its own
page of documentation, with tables demonstrating how the semantics depends on
the properties of the template parameters. For example:

 www.boost.org/libs/iostreams/doc/?page=functions/read.html%23reference

Jonathan


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