Boost logo

Boost :

Subject: Re: [boost] Standard stream from C fopen()
From: Daniel James (dnljms_at_[hidden])
Date: 2010-11-14 10:28:31

On 13 November 2010 23:49, Claude <clros_at_[hidden]> wrote:
> Ok, I now make correctly my stream with:
> stream<file_descriptor_source> in(file_descriptor_source(fp));

Sadly, that doesn't mean what you think it means. You've declared a
function which takes a file_desciptor_source as a parameter. This is
known as "C++'s most vexing parse", after an article about it in the
book Effective C++. If you don't have that book, there's an article
about it here:

The errors that you're getting should have the type of 'in' as a
function, which is the clue. Also, if you use 'clang' it gives a
helpful warning.


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