Opened 15 years ago
Closed 15 years ago
#1198 closed Bugs (fixed)
patch: boost/function/function_template.hpp fails to compile with gcc -fno-exceptions
Reported by: | Owned by: | Douglas Gregor | |
---|---|---|---|
Milestone: | To Be Determined | Component: | function |
Version: | Boost 1.34.1 | Severity: | Problem |
Keywords: | Cc: |
Description
.... despite the fact that I've got BOOST_NO_EXCEPTIONS defined. Here's the error message:
.../boost/function/function_template.hpp:597: error: exception handling disabled, use -fexceptions to enable
The following patch fixes it but I'm not sure the #else part is correct:
===== boost/function/function_template.hpp 1.1 vs edited ===== --- 1.1/boost/function/function_template.hpp 2007-08-17 11:57:51 +01:00 +++ edited/boost/function/function_template.hpp 2007-08-22 13:55:32 +01:00 @@ -592,12 +592,16 @@ return *this; this->clear(); +#ifndef BOOST_NO_EXCEPTIONS try { this->assign_to_own(f); } catch (...) { vtable = 0; throw; } +#else + this->assign_to_own(f); +#endif return *this; }
Change History (3)
comment:1 by , 15 years ago
Component: | None → function |
---|---|
Owner: | set to |
comment:2 by , 15 years ago
comment:3 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Actually, there are two try/catch blocks to wrap with an #ifdef BOOST_NO_EXCEPTIONS block: one at line 564, the other at line 595.