Boost logo

Boost :

From: Anton Gluck (gluc_at_[hidden])
Date: 2000-11-02 22:29:02


Dave,

> Ah. The problem is that more things are being passed by const reference now.
> That includes your ClassA::SomeMeasure [if the boost maintainer of the
> call_traits library could fix it for MSVC, this wouldn't be the case, but in
> the meantime I had to use my own crude mechanism]. You really needed this
> addition function for completeness anyway, so you might want to add it now:

[snip]

Once again, you solved the problem. Thanks!

I am now also able to wrap the problematic TextRecordIterator for Python.
However, one of its function compiles with this warning:

d:\py_cpp/caller.h(33) : warning C4800: 'const class Record *const '
: forcing value to bool 'true' or 'false' (performance warning)
        d:\py_cpp/functions.h(54) : see reference to function template
instantiation 'struct _object *__cdecl py::Caller::call(const class Record
*const (__thiscall TextRecordIterator::*)(void),struct _object *,struct
_object *)' being compiled

If you look at the offending code, you'll see that we really do need to
get back that pointer:

const Record* const TextRecordIterator::Next() {
    if (fStatus != RecordIterator::SUCCESS) {
        return 0;
    } else {
        return &fData;
    }
}

The point of the TextRecordIterator is to hand over one reord after
another. A bool wouldn't do us much good here :-)

Do you have any suggestions for fixing this?

Thanks again,

Toni


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk