Boost logo

Boost :

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

Thorsten Ottosen wrote:
> David Abrahams <dave <at>> writes:
>> Thorsten Ottosen <nesotto <at>> 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:


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