Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-12-01 21:52:01

"Eric Niebler" <eric_at_[hidden]> wrote in message
> Jonathan Turkanis wrote:
> > "Eric Niebler" <eric_at_[hidden]> wrote:
> >>If anyone knows of a foolproof
> >>way to distinguish lvalues from rvalues, I'm all ears.
> >
> > Oddly enough, I was thinking about this last night, and wrote the attached
> > It may be wildly wrong
> <snip>
> Unfortunately, it is. There is a precedence problem because the
> expression to which the macro expands is not enclosed in parens. \

Whoops! I can't believe I made that mistake.

> In your
> tests, the ! is only applied to part of the expression, leading to false
> positives.

I think it leads to true negatives. ;-) The case you're interested in is

  const std::string h() { return "hello"; }


which now fails, except on GCC 3.4 :( Are you sure GCC is wrong here?


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