On Thu, 3 Aug 2006, chun ping wang wrote:
Hey I have several problem...
A.) Can boost::python work with templated argument...
Example:
template <class T> boost::tuple
boost::rsa_generate(const T& p, const T& q) { [snip] } BOOST_PYTHON_MODULE(rsa) { def("rsa_generate", boost::rsa_generate); }
[and]
Second question.. how come lambda function don't work.
COmpling this by itself..give no error.
template
class CONT> double MyAnn::getCondProb(const T& A, const T& B, const CONT >& DATA) { [snip] } now including this file.. and compling this gives error about "_1"
BOOST_PYTHON_MODULE(bayesian) { def ("getCondProb", getCondProb<long long>); }
For both def, you need to specify all template arguments. You can't take the address of a function template otherwise. You need to decide which instantiations to export. As for _1, what's the reported error? Could it be a namespace problem? -- François Duranleau LIGUM, Université de Montréal "Quand le dernier arbre sera abattu, la dernière rivière empoisonnée, le dernier poisson capturé, alors seulement vous vous apercevrez que l'argent ne se mange pas." - Prophétie d'un Indien Cree (cité par Marlo Morgan dans _Message des hommes vrais au monde mutant_) _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users