Boost logo

Boost :

From: Anton Gluck (gluc_at_[hidden])
Date: 2000-10-22 22:48:37


This time I'm trying to expose a method that uses an enumeration as an
argument to Python.

This is the method I'm trying to wrap:

  void SomeClass::SetSomeMeasure(SomeMeasure s) {
      measure = s;

SomeMeasure is defined in the corresponding header file as:

  enum SomeMeasure {
      case1 = 1,

The wrapper code is:


The error I get is:

  d:\py_cpp/caller.h(275) : error C2665: 'from_python' : none of the 86
  overloads can convert parameter 2 from type 'struct py::Type<enum

As usual, I'd appreciate any help.


Boost list run by bdawes at, gregod at, cpdaniel at, john at