[C++-sig] expose functor?

Neal Becker ndbecker2 at gmail.com
Wed Dec 15 01:54:40 CET 2010


Suppose I have a functor, e.g.:

template<typename F>
struct mag_sqr1 {
  F operator() (F z) {
    return (z * z);
  }
};

Any way to expose this a a python function?

def ("mag_sqr", ???);



More information about the Cplusplus-sig mailing list