Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to string for std::optional #1510

Merged
merged 1 commit into from
Jan 31, 2019

Conversation

robinmoussu
Copy link
Contributor

This commit add stringification for c++17 std::optional.

I used the same style than std::variant<std::monostate> for empty optionals ({ }), and no curly bracket around valid object (example: 0 or "abc"). See the added unit tests.

Given that this is a feature conditionally activated (if C++17 is available), then I don't know if the files modified by the script misc/CMakeLists.txt should be added.

@robinmoussu robinmoussu force-pushed the dev/optional_tostring branch from c4f5f78 to 1469351 Compare January 25, 2019 20:08
@codecov
Copy link

codecov bot commented Jan 25, 2019

Codecov Report

Merging #1510 into master will increase coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1510      +/-   ##
==========================================
+ Coverage   80.38%   80.41%   +0.03%     
==========================================
  Files         121      121              
  Lines        3409     3404       -5     
==========================================
- Hits         2740     2737       -3     
+ Misses        669      667       -2

@codecov
Copy link

codecov bot commented Jan 25, 2019

Codecov Report

Merging #1510 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1510   +/-   ##
=======================================
  Coverage   80.53%   80.53%           
=======================================
  Files         121      121           
  Lines        3436     3436           
=======================================
  Hits         2767     2767           
  Misses        669      669

@horenmar
Copy link
Member

Where did the tests go?

@robinmoussu robinmoussu force-pushed the dev/optional_tostring branch from e8a3dcd to 72b33a1 Compare January 26, 2019 18:02
@horenmar
Copy link
Member

The new flag should also be added to docs/configuration.md.

@robinmoussu robinmoussu force-pushed the dev/optional_tostring branch from 72b33a1 to 773de5b Compare January 29, 2019 21:47
@horenmar
Copy link
Member

I am just gonna merge it and add the documentation myself.

@horenmar horenmar merged commit 16dc219 into catchorg:master Jan 31, 2019
horenmar added a commit that referenced this pull request Jan 31, 2019
@robinmoussu
Copy link
Contributor Author

robinmoussu commented Jan 31, 2019

Thanks, I was going to do it, but I'm glad you did it.

@robinmoussu robinmoussu deleted the dev/optional_tostring branch January 31, 2019 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants