[SERVER-38572] Allow c++ expressions in default/implicit/validator IDL attributes Created: 12/Dec/18  Updated: 29/Oct/23  Resolved: 14/Dec/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.1.7

Type: Improvement Priority: Major - P3
Reporter: Sara Golemon Assignee: Sara Golemon
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-38450 Convert configuration options in src/... Closed
Backwards Compatibility: Fully Compatible
Sprint: Security 2018-12-17
Participants:

 Description   

Exapand the definitions of default, implicit, and validator.{gt,lt,gte,lte} to accept either a literal scalar (as they do now), or a dictionary containing "expr: string" and optionally "is_constexpr: bool"

If a literal scalar, non-numerics will be encapsulated as needed (current behavior).

if a dictionary containing 'expr', that expression will be used without encapsulation.  is_constexpr (default true) will also enforce that the expression provided must be evaluable as a constexpr, failing to do so will result in a compile error.



 Comments   
Comment by Githook User [ 14/Dec/18 ]

Author:

{'username': 'sgolemon', 'email': 'sara.golemon@mongodb.com', 'name': 'Sara Golemon'}

Message: SERVER-38572 Allow arbitrary C++ expressions in literal values
Branch: master
https://github.com/mongodb/mongo/commit/177c1d3d5f9e4f67ef17ef9506aaf0e0c5a14703

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