//#define XERR "multibuf"
//#define SRC XERR "/" __FILE__ ": "

#include "multibuf.ih"

MultiBuf::Stream *MultiBuf::find(ostream &str) const
{
    auto iter = find_if(d_os.begin(), d_os.end(), 
        [&](Stream const &stream)
        {
            return stream.d_ostrPtr == &str;
        }
    );

    return iter != d_os.end() ? const_cast<Stream *>(iter.base()) : 0;
}
