[Bug libstdc++/111963] New: Predicate copied when it could be forwarded in some STL algorithms

2023-10-24 Thread chgros at synopsys dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111963 Bug ID: 111963 Summary: Predicate copied when it could be forwarded in some STL algorithms Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal

[Bug c++/111247] New: Very confusing diagnostic when attempting to initialize an incomplete type: "too many initializers"

2023-08-30 Thread chgros at synopsys dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111247 Bug ID: 111247 Summary: Very confusing diagnostic when attempting to initialize an incomplete type: "too many initializers" Product: gcc Version: 12.1.0 Status: UNCONFIR

[Bug libstdc++/109305] Allocator copy in basic_string::operator=

2023-03-28 Thread chgros at synopsys dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109305 --- Comment #7 from Charles-Henri Gros --- For context, we're trying to detect cases where using "auto" unintentionally creates a copy (it's regrettably common). Here the copy is necessary to get a non-const value; that's definitely something we

[Bug libstdc++/107850] [12 Regression] std::erase_if (map) forces predicate to takes a const value_type

2022-11-29 Thread chgros at synopsys dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107850 --- Comment #10 from Charles-Henri Gros --- I'd be happy with any algorithm that meets my needs, though the presence of a different algorithm that does the same thing that the existing algorithm currently does, or at least subsumes all the exist

[Bug libstdc++/107850] [12 Regression] std::erase_if (map) forces predicate to takes a const value_type

2022-11-29 Thread chgros at synopsys dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107850 --- Comment #8 from Charles-Henri Gros --- Thanks for all the comments. I agree that for consistency this should be rejected, though my preference would still be to make remove_if/erase_if more useful in practical cases (this happens dozens of t

[Bug libstdc++/107850] [12 Regression] std::erase_if (map) forces predicate to takes a const value_type

2022-11-28 Thread chgros at synopsys dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107850 --- Comment #4 from Charles-Henri Gros --- Looking into it further, there may be an implicit requirement that the predicate does not modify its argument. https://eel.is/c++draft/algorithms.requirements#6 "When not otherwise constrained, the Pred

[Bug c++/107850] New: std::erase_if (map) forces predicate to takes a const value_type

2022-11-23 Thread chgros at synopsys dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107850 Bug ID: 107850 Summary: std::erase_if (map) forces predicate to takes a const value_type Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal