|
Boost : |
From: jsiek_at_[hidden]
Date: 2000-06-29 16:09:08
David Abrahams writes:
> My biggest problem with pairs is the memnonic value of the members first and
> second (almost nil in situations like this). 2 opposing arguments:
> 1. we should return
> struct lexical_cast_result<T> {
> T value;
> bool succeeded;
> }
>
> for clarity. We'd have to provide conversions so that tie() would still
> work.
Why not just always use tie? Name the variables you use "value" and
"succeeded", and then everything is clear.
> 2. We should use the precedent set by pair<iterator, bool> to say that
> everyone will remember that the 2nd element indicates success.
-Jeremy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk