[SERVER-14035] Introduce MONGO_NOEXCEPT macro for labeling methods that mustn't throw. Created: 22/May/14 Updated: 10/Dec/14 Resolved: 04/Jun/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andy Schwerin | Assignee: | Andy Schwerin |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | c++11 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Participants: |
| Description |
|
The C++11 implementation will be noexcept and the legacy implementation will be throw (). For purposes currently of interest in the mongodb codebase, these have the same effect of having terminate() called at runtime if an exception bubbles out of them. |
| Comments |
| Comment by Andy Schwerin [ 04/Jun/14 ] |
|
MSVC does not support noexcept or throw(), so this cannot be implemented for all supported compilers at present. |
| Comment by Githook User [ 04/Jun/14 ] |
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}Message: Revert " This reverts commit 6fea6df0f8065bfa28fa17f94a5150482ed780da, because MSVC cannot |
| Comment by Andy Schwerin [ 03/Jun/14 ] |
|
MONGO_NOEXCEPT's definition under MSVC was incorrect, because MSVC does not support standard behaviors for throw () or noexcept. See http://msdn.microsoft.com/en-us/library/wfa0edys.aspx for details. |
| Comment by Githook User [ 27/May/14 ] |
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}Message: These macros expand to "noexcept" in C+11 and "throw ()" in earlier C+ |