$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Matt Hurd (matt_at_[hidden])
Date: 2003-07-04 13:43:43
>-----Original Message-----
>From: Jaakko Jarvi [mailto:jajarvi_at_[hidden]]
<snip>
>
>> Any clues?
>
>There seems to be two things. First, LL can't deduce the return type
>of gen_long() call. That is a bit odd, as the class seems to define
>result_type, which should be enough. Anyway, that can be fixed with
>
>bind<long>(gen_long)
>
>Then your gen_long is a stateful object, and the operator() is not
>defined as const. Lambda functors store all arguments by default
>as const copies. You must thus tell the library to store a
>reference to your original function object:
>
>bind<long>(ref(gen_long))
>
>var does just as well:
>
>bind<long>(var(gen_long))
>
> Cheers, Jaakko
Beautiful. Thanks mate.
Matt.