
13 Dec
2006
13 Dec
'06
10:49 p.m.
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
6759
Age (days ago)
6759
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jeffrey Williams