Boost logo

Boost :

From: Yitzhak Sapir (yitzhaks_at_[hidden])
Date: 2002-05-23 05:35:15


I tried all the options I described, including changing the function_template.hpp to see that it works. boost::ref is a class generator that creates a reference wrapper. operator() is not defined for the wrapper. Even if I wanted to define it I wouldn't know what return type to declare for this operator() using current C++ constructs and without assuming the class being wrapped defines a return_type or something similar.

> ----- Original Message -----
> From: "Yitzhak Sapir" <yitzhaks_at_[hidden]>
>
> > Using boost::thread(boost::ref(*this)) is not possible
> because ref()
> > cannot know which return types to define for possible operator()
> > calls.
>
> Have you tried it? Because I don't think boost::ref has to
> know this at
> all. boost::function0<void> can be constructed from ANY
> object for which
> the code line: "object();" is legal. (This is all 'as far as I know'.)
>
> Dirk Gerrits


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