Hello, he following test program fails to compile with Boost-1.41 on msvc8.0 SP1. It was working fine with Boost-1.40. Am I missing something here ? Thanks, Surya #include <iostream> #include <boost/preprocessor.hpp> #include <boost/fusion/container.hpp> using namespace std ; using namespace boost ; #define MAX_ARGS 5 template <int id, BOOST_PP_ENUM_PARAMS(MAX_ARGS, typename T)> void func (const boost::fusion::vector<BOOST_PP_ENUM_PARAMS(MAX_ARGS, T)> p_args) { cout << "Multiple Arguments: id " << id << endl ; } template<int id> void func (void) { cout << "No arguments: id " << id << endl ; func <id>(boost::fusion::make_vector()) ; } int main (void) { func<10> (boost::fusion::make_vector(1, 2)) ; func<6> () ; return 0 ; }
Surya Kiran Gullapalli wrote:
On Thu, Nov 19, 2009 at 12:41, Surya Kiran Gullapalli <suryakiran.gullapalli@gmail.com <mailto:suryakiran.gullapalli@gmail.com>> wrote:
Hello, he following test program fails to compile with Boost-1.41 on msvc8.0 SP1. It was working fine with Boost-1.40.
With Gcc-4.4.0 also it failed on linux.
fusion::make_vector now returns the numbered vectors for efficiency at compile time. Hence, your overloads will not catch them. line 25: error: no matching function for call to 'func(boost::fusion::vector2<int, int>)' ^^^^^^^ Some metaprogramming should do the trick. Regards, -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net http://www.facebook.com/djowel Meet me at BoostCon http://www.boostcon.com/home http://www.facebook.com/boostcon
On Thu, Nov 19, 2009 at 22:29, Joel de Guzman <joel@boost-consulting.com>wrote:
Surya Kiran Gullapalli wrote:
On Thu, Nov 19, 2009 at 12:41, Surya Kiran Gullapalli < suryakiran.gullapalli@gmail.com <mailto:suryakiran.gullapalli@gmail.com>> wrote:
Hello, he following test program fails to compile with Boost-1.41 on msvc8.0 SP1. It was working fine with Boost-1.40.
With Gcc-4.4.0 also it failed on linux.
fusion::make_vector now returns the numbered vectors for efficiency at compile time. Hence, your overloads will not catch them.
line 25: error: no matching function for call to 'func(boost::fusion::vector2<int, int>)' ^^^^^^^
Some metaprogramming should do the trick.
Thanks, I'm able to solve it by PP metaprogramming. But this change was not documented. Or did i miss that ? Surya
participants (2)
-
Joel de Guzman
-
Surya Kiran Gullapalli