
I don't understand why the compiler thinks there is am ambiguity. I pass only two template arguments and expected the compiler to select the matching for_each with two template arguments. inline CThis &operator=(const double _d) { m_dValue = _d; boost::mpl::for_each<CDB, CSet0>(CSet0(*this)); return *this; } c:\documentsandsettings\pfoelsch\mydocuments\hisim_hv\win32\gglib\mosfet_bsim3v324\../../classlib/CDer.h(291) : error C2668: 'boost::mpl::for_each' : ambiguous call to overloaded function C:\boost_1_35_0\boost/mpl/for_each.hpp(105): could be 'void boost::mpl::for_each<CDB,CDer<CDB>::CSet0>(F,Sequence *)' with [ CDB=boost::mpl::vector<boost::mpl::false_,boost::mpl::true_,boost::mpl::true_>, F=CDer<boost::mpl::vector<boost::mpl::false_,boost::mpl::true_,boost::mpl::true_>>::CSet0, Sequence=boost::mpl::vector<boost::mpl::false_,boost::mpl::true_,boost::mpl::true_> ] C:\boost_1_35_0\boost/mpl/for_each.hpp(91): or 'void boost::mpl::for_each<CDB,CDer<CDB>::CSet0,CDer<CDB>::CSet0>(F,Sequence *,TransformOp *)' with [ CDB=boost::mpl::vector<boost::mpl::false_,boost::mpl::true_,boost::mpl::true_>, F=CDer<boost::mpl::vector<boost::mpl::false_,boost::mpl::true_,boost::mpl::true_>>::CSet0, Sequence=boost::mpl::vector<boost::mpl::false_,boost::mpl::true_,boost::mpl::true_>, TransformOp=CDer<boost::mpl::vector<boost::mpl::false_,boost::mpl::true_,boost::mpl::true_>>::CSet0 ] while trying to match the argument list '(CDer<CDB>::CSet0, boost::mpl::vector<T0,T1,T2> *)' with [ CDB=boost::mpl::vector<boost::mpl::false_,boost::mpl::true_,boost::mpl::true_> ] and [ T0=boost::mpl::false_, T1=boost::mpl::true_, T2=boost::mpl::true_ ] c:\documentsandsettings\pfoelsch\mydocuments\hisim_hv\win32\gglib\mosfet_bsim3v324\../../classlib/CDer.h(290) : while compiling class template member function 'CDer<CDB> &CDer<CDB>::operator =(const double)' with [ CDB=boost::mpl::vector<boost::mpl::false_,boost::mpl::true_,boost::mpl::true_> ] c:\documentsandsettings\pfoelsch\mydocuments\hisim_hv\win32\gglib\mosfet_bsim3v324\bsim3_include.h(16) : see reference to class template instantiation 'CDer<CDB>' being compiled with [ CDB=boost::mpl::vector<boost::mpl::false_,boost::mpl::true_,boost::mpl::true_> ]