To add to Stefan's answer:
I do the the same and also use visitors to add the same sets of members to
classes, with possible customizations via trait classes.
HTH
On Wed, Mar 19, 2014 at 1:36 PM, Stefan Seefeld wrote:
> Francesco,
>
> I have done something like what you are suggesting. It ess
Francesco,
I have done something like what you are suggesting. It essentially boils
down to defining a function template like
template
void define_vector(char const *name)
{
class_<...> vector(name);
...
}
and then calling that multiple times:
define_vector("IVector");
define_vector(
Greetings,
I have been trying to think of a solution about this for a few days now,
but I did not get very far.
I am exposing specific instances of C++ template classes using
Boost.Python. Let's say for the sake of argument that I am exposing
std::vector. What I would like to achieve on the Pytho