|
Boost Users : |
From: Daniel Schlyder (daniel_at_[hidden])
Date: 2005-05-12 13:28:14
Hi,
The following used to compile with MinGW GCC 3.4.2:
<code>
#include <boost/iostreams/concepts.hpp>
#include <boost/iostreams/stream_facade.hpp>
#include <iostream>
class my_sink : public boost::iostreams::sink
{
public:
std::streamsize write(char const *, std::streamsize size)
{
return size;
}
void foo()
{
std::cout << "foo() called" << std::endl;
}
};
int main()
{
boost::iostreams::stream_facade<my_sink> out;
out->foo();
return 0;
}
</code>
Now I get the following error:
E:/libs/boost/boost/iostreams/stream_facade.hpp: In member function
`my_sink * boost::iostreams::stream_facade<my_sink, char_traits<char> >
::operator->()':
boost_iostreams_issues.cpp:36: instantiated from here
E:/libs/boost/boost/iostreams/stream_facade.hpp:119: error: no match for
'operator *' in '*(
(
(
boost::base_from_member<
boost::iostreams::streambuf_facade<
my_sink, char_traits<char>, boost::iostreams::output
>, 0
> *
)(
(boost::iostreams::stream_facade<my_sink, char_traits<char> >
*
)this
)
) + 4u
)->boost::base_from_member<
boost::iostreams::streambuf_facade<
my_sink, char_traits<char>, boost::iostreams::output
>, 0
>::member'
It compiles if I remove the call to foo().
What must I do to make it work again?
Thanks,
-- Daniel Schlyder http://bitblaze.com/
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net