Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-10-27 08:13:36

----- Original Message -----
From: "Anton Gluck" <gluc_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, October 27, 2000 12:48 AM
Subject: Re: [boost] Re: from enumerations to I/O streams

> > Actually not. It's complaining that you're trying to bind a non-const
> > ifstream reference to a const ifstream object. It's a const-correctness
> > issue, and it's /my/ bug. I'm working on a fix. In the meantime, I think
> > best you can do is to arrange for a constructor which takes a pointer to
> > ifstream as a parameter. If you don't want to intrude on your class'
> I have tried adding a second constructor, but am still getting an error
> from py_cpp:
> d:\py_cpp/extclass.h(475) : error C2664: '__thiscall
> TextRecordIterator::TextRecordIterator(class
> std::basic_ifstream<char,struct std::char_traits<char> > &)' : cannot
> convert parameter 1 from 'class std::basic_ifstream<char,struct
> std::char_traits<char> > *const ' to 'class
> std::char_traits<char> > &'
> Is this part of the same bug, since it again involves const and non-const
> binding?

Yes. Non-const reference parameters to constructors don't work (yet). Fixing
this involves finding a way around the infamous reference-to-reference bug
which works on MSVC, which apparently takes some doing. If you can arrange
for a non-const pointer in the interface in place of the reference, though,
you can use it from Python with the same interface.


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