Is there any difference between the two? Or am I safe to replace every occurrence of boost::bind by std::bind in my code and thereby remove the dependence on Boost?
Is there any difference between the two? Or am I safe to replace every
Share
boost::bindhas overloaded relational operators,std::binddoes not.boost::bindsupports non-default calling conventions,std::bindis not guaranteed to (standard library implementations may offer this as an extension).boost::bindprovides a direct mechanism to allow one to prevent eager evaluation of nested bind expressions (boost::protect),std::binddoes not. (That said, one can useboost::protectwithstd::bindif they want, or trivially reimplement it on their own.)std::bindprovides a direct mechanism to allow one to treat any user defined functor as a nested bind expression in order to force eager evaluation (std::is_bind_expression: [func.bind.isbind]/1, [func.bind.bind]/10),boost::binddoes not.