Boost logo

Boost Users :

From: Douglas Gregor (dgregor_at_[hidden])
Date: 2005-02-13 16:58:30


On Feb 12, 2005, at 8:48 PM, Welson Sun wrote:
> Thanks, you are right. Now both the vertex property writer and edge
> property
> writer works.

Great!

> But I don't understand why "reference" will cause this problem? Isn't
> it
> just an alias of an object?

It's a C++ quirk... when you have a temporary value, you can't pass it
to a non-const reference. The intent is to help you avoid accidentally
making changes to a temporary that will never be seen elsewhere, but
sometimes it's a little weird.

        Doug


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net