Patch for ifstream_line_iterator_test regression failure

Hello all, I'm attaching a patch for ifstream_line_iterator_test regression failure. It's probably gcc bug (i test it for mingw 3.4.2, but i noticed same error in linux tests), because compiler generates copy constructor for temporary variables and never use it (for those who want to test it in linux environment i'm attaching minimal example). Regards, Janusz

Thanks, applied. Let see on regression results now. How about gcc 4.0.0 failures? Gennadiy

On Mon, Jun 06, 2005 at 10:57:02PM +0200, Janusz Piwowarski wrote:
Hello all,
I'm attaching a patch for ifstream_line_iterator_test regression failure. It's probably gcc bug (i test it for mingw 3.4.2, but i noticed same error in linux tests), because compiler generates copy constructor for temporary variables and never use it (for those who want to test it in linux environment i'm attaching minimal example).
If I understand you correctly, this is a bug in the code, not GCC: http://gcc.gnu.org/bugs.html#cxx_rvalbind jon

From: "Jonathan Wakely"
I'm attaching a patch for ifstream_line_iterator_test regression failure. It's probably gcc bug (i test it for mingw 3.4.2, but i noticed same error in linux tests), because compiler generates copy constructor for temporary variables and never use it (for those who want to test it in linux environment i'm attaching minimal example).
If I understand you correctly, this is a bug in the code, not GCC: http://gcc.gnu.org/bugs.html#cxx_rvalbind
"This might be surprising at first sight" - c++ code starts look like scripting language. I'm attaching the patch that allows bind invalid ifstream_line_iterator to the reference (it shall fix failure with gcc 4.0 and others). Regards, Janusz

"Jonathan Wakely" <cow@compsoc.man.ac.uk> wrote in message news:20050607155238.GA783@compsoc.man.ac.uk...
On Mon, Jun 06, 2005 at 10:57:02PM +0200, Janusz Piwowarski wrote:
Hello all,
I'm attaching a patch for ifstream_line_iterator_test regression failure. It's probably gcc bug (i test it for mingw 3.4.2, but i noticed same error in linux tests), because compiler generates copy constructor for temporary variables and never use it (for those who want to test it in linux environment i'm attaching minimal example).
If I understand you correctly, this is a bug in the code, not GCC: http://gcc.gnu.org/bugs.html#cxx_rvalbind
Yep. That'ts the "feature" preventing compilation (I still not sure why standard require copy constructor in this case). So now any temporary of noncopyable type couldn't participate in comparison operator. I've decided not to fight this. Let's just make them non-temporary. Gennadiy.

"Gennadiy Rozental" <gennadiy.rozental@thomson.com> writes:
"Jonathan Wakely" <cow@compsoc.man.ac.uk> wrote in message news:20050607155238.GA783@compsoc.man.ac.uk...
On Mon, Jun 06, 2005 at 10:57:02PM +0200, Janusz Piwowarski wrote:
Hello all,
I'm attaching a patch for ifstream_line_iterator_test regression failure. It's probably gcc bug (i test it for mingw 3.4.2, but i noticed same error in linux tests), because compiler generates copy constructor for temporary variables and never use it (for those who want to test it in linux environment i'm attaching minimal example).
If I understand you correctly, this is a bug in the code, not GCC: http://gcc.gnu.org/bugs.html#cxx_rvalbind
Yep. That'ts the "feature" preventing compilation (I still not sure why standard require copy constructor in this case). So now any temporary of noncopyable type couldn't participate in comparison operator. I've decided not to fight this. Let's just make them non-temporary.
CWG issue 391 (in ready status) requires direct binding and eliminates the requirement for the accessible copy ctor. But no compilers have been changed to implement this resolution yet. I know the GCC won't make a move until the resolution is "written in stone." -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (4)
-
David Abrahams
-
Gennadiy Rozental
-
Janusz Piwowarski
-
Jonathan Wakely