Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2005-01-31 14:32:16


I am getting following error while compiling my test with gcc 3.4.2 on
Linux:

gcc-C++-action
../../../bin/boost/libs/test/test/ifstream_line_iterator_test.test/gcc-3.4.2
/debug/ifstream_line_iterator_test.o
/usr/local/gcc-3.4.2/lib/gcc/i686-pc-linux-gnu/3.4.2/../../../../include/c++
/3.4.2/bits/ios_base.h: In copy constructor `std::basic_ios<char,
std::char_traits<char> >::basic_ios(const std::basic_ios<char,
std::char_traits<char> >&)':
/usr/local/gcc-3.4.2/lib/gcc/i686-pc-linux-gnu/3.4.2/../../../../include/c++
/3.4.2/bits/ios_base.h:738: error: `std::ios_base::ios_base(const
std::ios_base&)' is private
../../../libs/test/test/ifstream_line_iterator_test.cpp:28: error: within
this context
/usr/local/gcc-3.4.2/lib/gcc/i686-pc-linux-gnu/3.4.2/../../../../include/c++
/3.4.2/streambuf: In copy constructor `std::basic_filebuf<char,
std::char_traits<char> >::basic_filebuf(const std::basic_filebuf<char,
std::char_traits<char> >&)':
/usr/local/gcc-3.4.2/lib/gcc/i686-pc-linux-gnu/3.4.2/../../../../include/c++
/3.4.2/streambuf:769: error: `std::basic_streambuf<_CharT,
_Traits>::basic_streambuf(const std::basic_streambuf<_CharT, _Traits>&)
[with _CharT = char, _Traits = std::char_traits<char>]' is private
../../../libs/test/test/ifstream_line_iterator_test.cpp:28: error: within
this context

An error occured in line performing comparison:

26: ifstream_line_iterator it( "abc" );
27:
28: BOOST_CHECK( it != ifstream_line_iterator() );

Looks like compiler end up generating copy constructor. Why did this
happend? Is there workaround?

Gennadiy


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