[CXX-1638] Don't call string_view::to_string Created: 14/Aug/18  Updated: 28/Oct/23  Resolved: 29/Aug/18

Status: Closed
Project: C++ Driver
Component/s: None
Affects Version/s: 3.3.1
Fix Version/s: 3.4.0

Type: Bug Priority: Minor - P4
Reporter: Kevin Albertson Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

MNMLSTC defines string_view::to_string but that is not part of STL. So client code that may work when using MNMLSTC may not compile otherwise. Example:

bsoncxx::stdx::string_view view("test");
std::string copy = view.to_string();



 Comments   
Comment by Githook User [ 30/Aug/18 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: CXX-1638 Fix string_view to string conversions
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/a7f88ab5fb3f5020cb2d4f5700a76b0fd15ddd1b

Comment by Githook User [ 29/Aug/18 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: CXX-1638 Don't call string_view::to_string

The method is defined in the MNMLSTC shim library for now, but is not in
the C++17 standard.
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/bf84a3733ea9d7b33e71bf6c239cc68f108cfcf7

Comment by Andrew Morrow (Inactive) [ 14/Aug/18 ]

I'm not sure there is really anything to do for this other than file an upstream PR with the MNMLSTC maintainer to withdraw to_string now that the C++17 string_view is of known shape.

Generated at Wed Feb 07 22:03:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.