Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-04-05 07:55:52


From: "David Abrahams" <abrahams_at_[hidden]>

> Yes. The problem is that to properly forward such arguments, you need to a
> version which takes, for each parameter:
>
> T&
> T const&
> T volatile&
> T const volatile&

Actually I think that "T &" and "T const &" will suffice. The plain
reference will bind to anything except non-const temporaries.

BTW, in MSVC literals are const, so the plain reference works most of the
time.

The inability to write an argument that will take _anything_ while
preserving the type is pretty annoying - lambda function objects need it as
well.

--
Peter Dimov
Multi Media Ltd.

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