Hi all,
I have an overloaded template function, and in one particular spot can't
get the right version of it to be called. Everywhere else in the program
the correct version is called. Here's the function declarations:
template <class NumT, class ExpT>
NumT rppower (NumT const x, ExpT const y);
template <class NumT, class ExpT>
SafeInt<NumT> rppower (SafeInt<NumT> const x, SafeInt<ExpT> const y);
template <class NumT, class ExpT>
SafeInt<NumT> rppower (SafeInt<NumT> const x, ExpT const y);
template <class NumT, class ExpT>
SafeInt<NumT> rppower (NumT const x, SafeInt<ExpT> const y);
And here's the offending call and containing function. The function is
abbreviated, but the relevant parts should be there:
template <class T> T ArbInt::Value () const {
SafeInt<T> retval;
// _DigsT is vector<unsigned int>
for (typename _DigsT::iterator i = _digits>begin();
i != _digits>end(); ++i) {
retval += *i * rppower(SafeInt<T>(s_digitbase),
(i  _digits>begin()));
}
return retval;

For some reason, the first version of rppower is always called, with
NumT being a SafeInt<T>. SafeInt has a casting operator to T's type, but
that shouldn't be being called if there's a better match, and in other
areas it's called correctly. I've tried explicitly specifying rppower<T,
_DigsT::size_type>, I've tried making both arguments to rppower a
SafeInt, and I've even tried making the first version of rppower the
last one declared. Oh, and the * operator is overloaded for unsigned int
* a SafeInt.
I know it's a crazy mess of overloaded functions and operators, but
maybe something will stick out. Here's hoping.
Thanks!
 Dave
