$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Jeffrey Williams (jwilliams_at_[hidden])
Date: 2006-12-13 17:49:35
Hi all,
The following code compiles on mingw (gcc 3.4.5) but not on VC++ 8.0
express, and I am asking if anyone could tell me which compiler is right.
Here is simple test case:
struct caster
{
template<class T> operator boost::function<T>() const;
};
void func(boost::function<void(int)>) { }
void foo()
{
func(caster());
}
This compiles on mingw (it doesn't link obviously) but it won't even compile
on VC++ 8.0 express. I am assuming one or the other is incorrect (perhaps
they both are) so which is it? and also, is there a proper way to do that
conversion that would work on both compilers. doing a specific conversion
operator boost::function<void(int)> does work on both, but not the template.
Jeff