id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 5904,"Patch to suppress ""unreachable code"" warning from Visual Studio 2008/2010 (VC90/VC100)",gareth.sylvester-bradley@…,No-Maintainer,"Probably as a result of ticket #3311, Visual Studio correctly identifies unreachable code when instantiating a boost::iostreams::stream with a Device that doesn't support certain functionality (e.g. a write-only Sink). Since the relevant code is reachable for other kinds of Device, the simplest fix is to just suppress the warning. The equivalent warning for Borland is already suppressed in boost/iostreams/detail/config/disable_warnings.hpp. Code: {{{ #include #include #include boost::iostreams::stream< boost::iostreams::back_insert_device< std::deque< char > > > s; }}} Result (provided not /Od): {{{ 1>...\boost_1_47_0\boost\iostreams\detail\adapter\concept_adapter.hpp(77) : warning C4702: unreachable code 1>...\boost_1_47_0\boost\iostreams\detail\streambuf\indirect_streambuf.hpp(259) : warning C4702: unreachable code 1>...\boost_1_47_0\boost\iostreams\detail\streambuf\indirect_streambuf.hpp(260) : warning C4702: unreachable code 1>...\boost_1_47_0\boost\iostreams\detail\streambuf\indirect_streambuf.hpp(261) : warning C4702: unreachable code 1>...\boost_1_47_0\boost\iostreams\detail\streambuf\indirect_streambuf.hpp(263) : warning C4702: unreachable code 1>...\boost_1_47_0\boost\iostreams\detail\streambuf\indirect_streambuf.hpp(266) : warning C4702: unreachable code 1>...\boost_1_47_0\boost\iostreams\detail\adapter\concept_adapter.hpp(95) : warning C4702: unreachable code 1>...\boost_1_47_0\boost\iostreams\detail\streambuf\indirect_streambuf.hpp(333) : warning C4702: unreachable code }}} Patch for boost/iostreams/detail/config/disable_warnings.hpp: {{{ 17a18 > # pragma warning(disable:4702) // Unreachable code. }}} Please would someone apply this for Boost 1.48.0? ",Patches,new,Boost 1.48.0,iostreams,Boost 1.47.0,Problem,,,