*** close.hpp.orig Thu May 19 23:11:10 2005 --- close.hpp Thu Aug 3 21:31:26 2006 *************** *** 104,121 **** static void close(T& t, BOOST_IOS::openmode which) { typedef typename category_of::type category; ! const bool in = is_convertible::value && ! !is_convertible::value; ! if (in == ((which & BOOST_IOS::in) != 0)) t.close(); } template static void close(T& t, Sink& snk, BOOST_IOS::openmode which) { typedef typename category_of::type category; ! const bool in = is_convertible::value && ! !is_convertible::value; ! if (in == ((which & BOOST_IOS::in) != 0)) { non_blocking_adapter nb(snk); t.close(nb); } --- 104,125 ---- static void close(T& t, BOOST_IOS::openmode which) { typedef typename category_of::type category; ! const BOOST_IOS::openmode mask = ! is_convertible::value ? ! BOOST_IOS::out : ! BOOST_IOS::in; ! if ((which & mask) != 0) t.close(); } template static void close(T& t, Sink& snk, BOOST_IOS::openmode which) { typedef typename category_of::type category; ! const BOOST_IOS::openmode mask = ! is_convertible::value ? ! BOOST_IOS::out : ! BOOST_IOS::in; ! if ((which & mask) != 0) { non_blocking_adapter nb(snk); t.close(nb); }