#2098 closed Bugs (fixed)
system fails to compile with -fno-exceptions
Reported by: | Owned by: | Beman Dawes | |
---|---|---|---|
Milestone: | Boost 1.36.0 | Component: | system |
Version: | Boost 1.35.0 | Severity: | Problem |
Keywords: | Cc: |
Description (last modified by )
The regex component fails to compile with GCC when -fno-exceptions is specified. The attached patch allows the libraries / tests shipped with boost 1.35.0 to compile. There didn't seem to be a better option to make g++ happy than to just #ifndef out the catch(...) block, as it would otherwise complain about the throw in the block.
Attachments (1)
Change History (3)
by , 14 years ago
Attachment: | boost_system_no_exceptions.diff added |
---|
comment:1 by , 14 years ago
Description: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:2 by , 10 years ago
Note:
See TracTickets
for help on using tickets.
This no longer compiles on mac osx GCC 4 with BOOST_NO_EXCEPTIONS defined but without -fno-exceptions. BOOST_NO_EXCEPTIONS can be used to simply disable exception handling in boost no necessarily flag that exception handling is disabled at the compiler level:
http://www.boost.org/doc/libs/1_36_0/libs/utility/throw_exception.html
BOOST_NO_EXCEPTION can be used to supply a custom exception handler.
Wrapping the try block on line 136 on system/error_code.cpp fixes this.