[SERVER-35818] provide a stdx::variant Created: 26/Jun/18  Updated: 29/Oct/23  Resolved: 18/Jul/18

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 3.6.9, 4.0.4, 4.1.2

Type: New Feature Priority: Major - P3
Reporter: Mira Carey Assignee: Jonathan Reams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Duplicate
is duplicated by SERVER-26543 Polyfill C++17 std::variant Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.0, v3.6
Sprint: Platforms 2018-07-02, Platforms 2018-07-16
Participants:

 Description   

Given that c++ is coming down the pipeline, it'd useful to provide a stdx variant for 4.0 and earlier for ease of backports / use.

It seems like the author of libc++'s variant impl has a separate project with a header only implementation:
https://github.com/mpark/variant

This ticket is for the work to pull the 3rd party dependency + do the stdx hookup



 Comments   
Comment by Githook User [ 15/Oct/18 ]

Author:

{'name': 'Jonathan Reams', 'email': 'jbreams@mongodb.com', 'username': 'jbreams'}

Message: SERVER-35818 Add stdx::variant

(cherry picked from commit 309e4bc0867988210601454750760e0d00c896ca)
Branch: v3.6
https://github.com/mongodb/mongo/commit/6d66ca689648249fad6d14a738b295d4423121d8

Comment by Githook User [ 15/Oct/18 ]

Author:

{'name': 'Jonathan Reams', 'email': 'jbreams@mongodb.com', 'username': 'jbreams'}

Message: SERVER-35818 Add stdx::variant

(cherry picked from commit 309e4bc0867988210601454750760e0d00c896ca)
Branch: v4.0
https://github.com/mongodb/mongo/commit/c1875c99b3c133ca4aeee62f25d919fcbc530c6b

Comment by Githook User [ 18/Jul/18 ]

Author:

{'email': 'jbreams@mongodb.com', 'name': 'Jonathan Reams', 'username': 'jbreams'}

Message: SERVER-35818 Add stdx::variant
Branch: master
https://github.com/mongodb/mongo/commit/309e4bc0867988210601454750760e0d00c896ca

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