This patch implements P0759R1.
Details
Diff Detail
Event Timeline
I don't really understand how a lot of the changes in this patch implement the changes in the paper. Can you explain the rationale for each change?
The tests for each individual change need to be put in the exiting test files for the operations they modify.
I think this patch needs some work.
include/string | ||
---|---|---|
557 | fpos<_StateT> is the same as fpos in this context, no? | |
559 | This seems wrong. It's just another copy constructor overload, but that takes by value. | |
test/std/strings/fpos/fpos.pass.cpp | ||
2 | These tests should be integrated into the existing tests files under std/input.output/iostreams.base/fpos/fpos.operations. The test name and directory correspond directly to the stable name of the section of the standard it is testing. | |
34 | No test for the trivial copy constructor requirements? |
I got confused about what type o was in the paper. This patch should conform to the paper properly. I will update the tests in the correct places but wanted to get this part out for review first.
include/string | ||
---|---|---|
563 | The overloads conflict with the plus and minus overloads for streamoff. I think it would be fine to use those overloads (because they will convert both sides to streamoff), but I am also happy to define the behavior explicitly. |
include/string | ||
---|---|---|
542 | I re-ordered and updated these operators and member functions. I don't think it changes any of the functionality so I am fine without the updates (say the word, and I will remove the changes). |
- remove unneeded assignment operator
- move tests to correct location
(sorry for the repetitive updates)
include/string | ||
---|---|---|
542 | I think that's a good idea. This paper is supposed to be just wording cleanup; no changes to functionality, so lets make this patch just a test cleanup. The re-ordering, etc of the member functions and operators can be done afterwards as a NFC patch. |
include/string | ||
---|---|---|
542 | Sounds good. I will remove this part of the patch and re-upload the diff. |
test/std/input.output/iostreams.base/fpos/fpos.operations/fpos.pass.cpp | ||
---|---|---|
20 ↗ | (On Diff #200754) | But the updates made here were not a thing until C++20. Should I still have the test for earlier versions? Or should I change this to only work after C++17? |
Some of the tests you added are already present in other files, for example libcxx/test/std/input.output/iostreams.base/fpos/fpos.operations/subtraction.pass.cpp. Any reason why you're duplicating those checks in test/std/input.output/iostreams.base/fpos/fpos.operations/fpos.pass.cpp?
test/std/input.output/iostreams.base/fpos/fpos.operations/fpos.pass.cpp | ||
---|---|---|
20 ↗ | (On Diff #200754) | Since this is a DR, I think it's OK to assume the fix is there in prior standards. So you should remove the UNSUPPORTED annotation. |
28 ↗ | (On Diff #200754) | std::declval<T const&>() instead? |
34 ↗ | (On Diff #200754) | @zoecarver Action item: add a message! |
54 ↗ | (On Diff #200754) | I don't think you need any other types. |
Yes, some of the tests are duplicated (subtraction, addition, comparison, etc.) but, I think it is nice to have it match the order of the table in the standard. Say the word and I'll remove the duplication, though.
libcxx/www/cxx2a_status.html | ||
---|---|---|
96 ↗ | (On Diff #226669) | Can you mark it as being implemented in LLVM 11.0? |
These tests should be integrated into the existing tests files under std/input.output/iostreams.base/fpos/fpos.operations.
@EricWF Do you still want me to split this up? I'm going to commit this patch as-is (with the change @ldionne asked for) but, if you still want me to split this test up, post a comment here and I'll revert, make the change, and put the patch here for re-review.
Committed as df73e36dc6ffd2ede500189b075f7ac52794b3ad. I can't close the revision for some reason (probably because of the blocking reviews).
I re-ordered and updated these operators and member functions. I don't think it changes any of the functionality so I am fine without the updates (say the word, and I will remove the changes).