Boost logo

Boost Users :

From: Francesco Biscani (bluescarni_at_[hidden])
Date: 2007-05-20 09:12:19


Hello,

I get an error when I'm trying to use a const member function in a multi-index
container, as a template parameter for indexed_by<>. This const member
function comes from a base class, from which the class contained in the
multiindex container is derived. The error is the following:

/home/yardbird/documenti/work/prog/piranha/pyranha/Gsp/../../src/polynomial.h:41:
error: could not convert template
argument ‘&piranha::base_monomial_gmp_array<piranha::double_cf>::get_degree’
to ‘int (piranha::monomial_gmp_array<piranha::double_cf>::*)()const’

The member function is named "get_degree", and returns an integer. The base
class is "base_monomial_gmp_array", the derived class is,
unsurprisingly, "monomial_gmp_array". If I "lift" this function to the
derived class, by re-defining it there, the problem disappears.

I have a hunch that probably with some clever typedef or some static_cast
wizardy this could be resolved, however my experiments have not resolved
anything yet. Does anyone have an idea on how to proceed?

Thanks in advance,

  Francesco Biscani.


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