[SERVER-22973] #define MONGO_STATIC_ASSERT(cond) static_assert(cond, #cond) Created: 04/Mar/16  Updated: 19/Nov/16  Resolved: 09/Sep/16

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 3.3.14

Type: Improvement Priority: Major - P3
Reporter: Mathias Stearn Assignee: Matt Cotter
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Platforms 2016-09-19
Participants:

 Description   

Currently we need to repeat the condition in the message field which in addition to being redundant, has the risk of discrepancies. If compilers are ever able to generate better error message from 1-arg static_assert, we could convert the macro to take advantage of it.



 Comments   
Comment by Githook User [ 09/Sep/16 ]

Author:

{u'username': u'Machyne', u'name': u'Matt Cotter', u'email': u'matt.cotter@mongodb.com'}

Message: SERVER-22973 use mongo macros for static assert
Branch: master
https://github.com/mongodb/mongo/commit/2bd286acef2fdb035f1d45253f6e6e4c24a2dc04

Generated at Thu Feb 08 04:01:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.