Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-08-18 08:41:05


Rob Stewart <stewart_at_[hidden]> writes:

> I uploaded some fixes to multivalues.zip:
>
> - Workaround for BCB's lack of EBO
>
> - Fixed some overzealous searches/replaces
>
> - Eliminated SFINAE from test program
>
> - Moved some tests out of the macros to assist in debugging,
> should anyone have problems with support in a particular
> compiler.
>
> Some questions:
>
> - What operator(s) should we use to delimit user-defined
> predicates? Here are some interesting candidates:
>
> if (any_of(...) << some_predicate() >> 5)... // 1
>
> if (any_of(...) < some_predicate() > 5)... // 2
>
> if (any_of(...) ^ some_predicate() ^ 5)... // 3
>
> if (any_of(...) / some_predicate() / 5)... // 4
>
> 1 seems pretty good because the two-character operators stand
> out well. 2 works pretty well, but I'm concerned that the
> operators may get lost if the predicate is a specialization of
> a template type; the template argument list uses the same
> tokens. (1 is better in that case because of the doubled
> tokens.)

None of them look right to me. Unless you close up the spaces next to
some_predicate(), they appear to be doing what the usual C++ operators
do. a < b looks like less-than; a <b immediately starts to suggest
something else.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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