Boost logo

Boost :

From: Joel de Guzman (djowel_at_[hidden])
Date: 2002-12-19 21:20:19


Is there a chance that we can add an operator() to the
reference wrapper? In particular, I would like to be able
to use it as a nullary functor. This would obviously be very
useful and should not disrupt the current code. In particular,
consider Spirit's conditional parsers (as once asked by


The condition is expected to be a functor that returns
a boolean condition. I was hoping that I can use the
ref(b) as a functor such that I can write:

    bool b;


Of course I can metaprogram the condition to dispatch
appropriately when the condition is a reference_wrapper
but it wouldn't be as simple and elegant.

Thoughts? TIA.

Joel de Guzman

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