Suppose I have a functor, e.g.:
template
struct mag_sqr1 {
F operator() (F z) {
return (z * z);
}
};
Any way to expose this a a python function?
def ("mag_sqr", ???);
___
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.o
On 14 Dec 2010 at 14:07, Jacob Davis wrote:
> I read through the thread back when I started work on this problem, but
> figured if it had been scrubbed out it might not be wise to use it. I'll go
> back and check it out soon, though.
Trampoline types are a very commonly used idiom in C++
metapro
On Tue, Dec 14, 2010 at 11:03 PM, Jacob Davis wrote:
>
>
> On Sun, Dec 12, 2010 at 3:04 PM, Jim Bosch wrote:
>
>> I think you'll want to define a custom wrapper class for each of these
>> typedefs with a distinct type. From your example, it looks like many of
>> these might be similar enough th
On Sun, Dec 12, 2010 at 3:04 PM, Jim Bosch wrote:
> I think you'll want to define a custom wrapper class for each of these
> typedefs with a distinct type. From your example, it looks like many of
> these might be similar enough that you could use a template:
>
> [snip]
>
> Now, for all the oth