|
Boost : |
Subject: Re: [boost] [review][assign] Formal review of Assign v2 ongoing
From: er (er.ci.2020_at_[hidden])
Date: 2011-06-21 17:40:32
On 6/21/11 4:19 PM, Brendon Costa wrote:
> Hi,
>
> I did briefly skim over the docs and compare between v1 and v2. The
> only point I have right now is that the docs for v2 are much less
> motivating compared to v1. The examples provided in v1 are clear and
> simple. In v2 I find the syntax less clear for describing the purpose
> of what is trying to be achieved. This could just be a documentation
> issue or an issue in the new library I have not had a chance to look
> through it thoroughly.
>
Noted, thanks. Perhaps I should have focused more on the core :
* For filling a container:
put( cont )( a, b )( c, d, e )( f, g, h ); // Variadic form
csv_put<2>( cont, a1, b1, a2, b2, a3, b3 ); // Fixed arity
Based on Simonson's comments I suggested an even simpler syntax,
essentially renaming csv_put<I>() to put<I>(), but for now I'll stick to
what already exists.
* To initialize a container:
// Variadic form:
C cont = converter( deque<T>( a, b )( c, d, e )( f, g, h ) );
// Fixed arity:
C cont = converter( csv_deque<T, 1>( a1, b1, a2, b2, a3, b3 ) );
A similar approach follows to construct a container in place (Called
explicit conversion in the tutorial).
Truth is, this covers a wide span of needs, perhaps most needs.
Everything else that is talked about in the tutorial might have
obfuscated it, I guess, as pertaining to filling & inserting.
Thanks, therefore, for you feedback. Any more questions?
Reference arrays and chaining can be seen as independent from the above
and were the topic of a mini-review in June. Please consider looking at
those as well. Thanks.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk