|
Boost Users : |
Subject: Re: [Boost-users] [lambda] Boost.Bind works, labmda bind fails to compile
From: Peter Dimov (pdimov_at_[hidden])
Date: 2009-12-30 11:58:40
Igor R wrote:
> Hello,
>
> Could someone please explain the following behavior:
>
> #include <boost/lambda/bind.hpp>
> #include <boost/bind.hpp>
>
> struct Functor
> {
> void operator()() const
> {}
> template<class T> void func(T t)
> {}
> };
>
> int main()
> {
> Functor f;
> boost::lambda::bind(&Functor::func<Functor>, &f, f); // doesn't
> compile
> boost::bind(&Functor::func<Functor>, &f, f); // compiles well
> }
Sounds like a bug in MSVC.
struct Functor
{
template<class T> void func(T t)
{}
};
template<class A1, class A2, class A3>
void ll_bind( A1 const & a1, A2 const & a2, A3 const & a3 )
{
}
int main()
{
Functor f;
ll_bind( &Functor::func<Functor>, &f, f ); // fails
}
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