Boost logo

Boost Users :

From: philippe DALET (philippe.dalet_at_[hidden])
Date: 2021-01-17 14:04:42


Hello,
It's my first mail on this maillist.

I started to upgrade a package for python 3.7, 3.8, 3.9 (linux and
windows): vpython-wx. One file gives me some problems num_util.hpp

My context:
ubuntu 20.04: boost 1.71 python3.7
windows 10: boost 1.75 python3.7, 3.8, 3.9

I want to create a double_array class:

Original version
---------------------
namespace cvisual { namespace python {
  using boost::python::numeric::array;
  class double_array : public array {
  public:
  explicit double_array( const boost::python::handle<>& h ) : array(h) {}
  };
  array makeNum(npy_intp n, NPY_TYPES t =NPY_DOUBLE);

New version
-----------------
namespace cvisual { namespace python {
  using boost::python::numpy::ndarray;
  class double_array : public ndarray {
  public:
  explicit double_array( const boost::python::handle<>& h ) : ndarray(h) {}
  };
  ndarray makeNum(npy_intp n, NPY_TYPES t =NPY_DOUBLE);

error message with VC2019 community
error conversion 'const boost::python::handle<PyObject>' in
'boost::python::detail::borrowed_reference'

error message with gcc 9.3
no matching function for call to
‘boost::python::numpy::ndarray::ndarray(const boost::python::handle<>&)’

Thanks a lot for your help.

Philippe DALET
Laboratoire de Physique
Lyp Champollion, Figeac
FRANCE



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net