[Y'know, I really wish replies would by default go the whole ub group...]


On 10 October 2013 17:35, Gabriel Dos Reis <gdr@microsoft.com> wrote:

I don’t know because I don’t have access to all machines, nor did anybody

came forward with that universal knowledge.

 

I am seriously hoping that we would NOT claim ‘willful ignorance’ as basis for design. 


I thought one of the design principles discussed today in another forum was to make the language and library less expert-only.

The fact that pointers may not be totally ordered makes any comparison of them in the realm of experts only.

If someone writes:

struct Foo
{
    X x;
    Y y;
    Z z;

    friend bool operator<(Foo const& l, Foo const& r)
    { return std::tie(l.x, l.y, l.z) < std::tie(r.x, r.y, r.z); }
};

If X, Y or Z are pointers, this code is broken!  And that is with tuple being designed *by experts* with this use case in mind.  If the committee can't handle it, what chance do mere mortals have?
--
 Nevin ":-)" Liber  <mailto:nevin@eviloverlord.com>  (847) 691-1404