Ticket #1002: close.hpp.patch
File close.hpp.patch, 1.4 KB (added by , 15 years ago) |
---|
-
close.hpp
old new 106 106 typedef typename category_of<T>::type category; 107 107 const bool in = is_convertible<category, input>::value && 108 108 !is_convertible<category, output>::value; 109 if (in == ((which & BOOST_IOS::in) != 0)) 109 const bool out = is_convertible<category, output>::value && 110 !is_convertible<category, bidirectional>::value; 111 if ((in && ((which & BOOST_IOS::in) != 0)) || 112 (out && ((which & BOOST_IOS::out) != 0))) { 110 113 t.close(); 114 } 111 115 } 112 116 template<typename T, typename Sink> 113 117 static void close(T& t, Sink& snk, BOOST_IOS::openmode which) … … 115 119 typedef typename category_of<T>::type category; 116 120 const bool in = is_convertible<category, input>::value && 117 121 !is_convertible<category, output>::value; 118 if (in == ((which & BOOST_IOS::in) != 0)) { 122 const bool out = is_convertible<category, output>::value && 123 !is_convertible<category, bidirectional>::value; 124 if ((in && ((which & BOOST_IOS::in) != 0)) || 125 (out && ((which & BOOST_IOS::out) != 0))) { 119 126 non_blocking_adapter<Sink> nb(snk); 120 127 t.close(nb); 121 128 }