Boost C++ Libraries: Ticket #11175: signals2, filesystem, probably others fail on clang targeting win32 when exceptions are disabled https://svn.boost.org/trac10/ticket/11175 <p> To reproduce: </p> <pre class="wiki"> clang -fno-exceptions -std=c++14 reprod.cpp </pre><p> reprod.cpp: </p> <pre class="wiki"> #include &lt;boost/filesystem.hpp&gt; #include &lt;boost/signals2.hpp&gt; </pre><p> You can target win32 from Linux using wclang (<a class="ext-link" href="https://github.com/tpoechtrager/wclang"><span class="icon">​</span>https://github.com/tpoechtrager/wclang</a>), though you must have a i686-w64-mingw32 environment installed. Substitute 'clang' for 'w32-clang' above. This is how I tested; since clang is rather universal as a compiler, these errors likely also occur when compiling for win32 on win32. </p> <p> The documentation for filesystem3 indicates that it should be usable with exceptions disabled, so this is a bug. </p> <p> Errors: </p> <pre class="wiki"> In file included from reprod.cpp:1: In file included from /usr/i686-w64-mingw32/local/include/boost/filesystem.hpp:17: /usr/i686-w64-mingw32/local/include/boost/filesystem/operations.hpp:80:9: error: cannot use 'try' with exceptions disabled try ^ /usr/i686-w64-mingw32/local/include/boost/filesystem/operations.hpp:92:9: error: cannot use 'try' with exceptions disabled try ^ /usr/i686-w64-mingw32/local/include/boost/filesystem/operations.hpp:105:9: error: cannot use 'try' with exceptions disabled try ^ /usr/i686-w64-mingw32/local/include/boost/filesystem/operations.hpp:132:9: error: cannot use 'try' with exceptions disabled try ^ /usr/i686-w64-mingw32/local/include/boost/filesystem/operations.hpp:1005:11: error: cannot use 'throw' with exceptions disabled BOOST_FILESYSTEM_THROW(filesystem_error( ^ /usr/i686-w64-mingw32/local/include/boost/filesystem/config.hpp:46:36: note: expanded from macro 'BOOST_FILESYSTEM_THROW' #define BOOST_FILESYSTEM_THROW(EX) throw EX ^ In file included from reprod.cpp:2: In file included from /usr/i686-w64-mingw32/local/include/boost/signals2.hpp:16: /usr/i686-w64-mingw32/local/include/boost/signals2/deconstruct_ptr.hpp:43:9: error: cannot use 'try' with exceptions disabled try ^ In file included from reprod.cpp:2: In file included from /usr/i686-w64-mingw32/local/include/boost/signals2.hpp:18: /usr/i686-w64-mingw32/local/include/boost/signals2/last_value.hpp:45:11: error: cannot use 'try' with exceptions disabled try ^ /usr/i686-w64-mingw32/local/include/boost/signals2/last_value.hpp:66:11: error: cannot use 'try' with exceptions disabled try ^ In file included from reprod.cpp:2: In file included from /usr/i686-w64-mingw32/local/include/boost/signals2.hpp:19: In file included from /usr/i686-w64-mingw32/local/include/boost/signals2/signal.hpp:28: /usr/i686-w64-mingw32/local/include/boost/signals2/detail/slot_call_iterator.hpp:87:15: error: cannot use 'throw' with exceptions disabled throw; ^ /usr/i686-w64-mingw32/local/include/boost/signals2/detail/slot_call_iterator.hpp:80:13: error: cannot use 'try' with exceptions disabled try ^ In file included from reprod.cpp:2: In file included from /usr/i686-w64-mingw32/local/include/boost/signals2.hpp:19: In file included from /usr/i686-w64-mingw32/local/include/boost/signals2/signal.hpp:29: /usr/i686-w64-mingw32/local/include/boost/signals2/optional_last_value.hpp:32:11: error: cannot use 'try' with exceptions disabled try ^ /usr/i686-w64-mingw32/local/include/boost/signals2/optional_last_value.hpp:53:11: error: cannot use 'try' with exceptions disabled try ^ 12 errors generated. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11175 Trac 1.4.3 Beman Dawes Mon, 31 Aug 2015 18:40:12 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11175#comment:1 https://svn.boost.org/trac10/ticket/11175#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> The problem was out-of-date documentation causing users to incorrectly expect that the library could be used with exceptions disabled. It cannot be used without exceptions, and the documentation has been changed to reflect this reality. </p> <p> Sorry for the confusion, </p> <p> --Beman </p> Ticket