F-strings for C++26 proposal

Viewed 181
The proposal for adding f-strings to C++26 introduces a new string literal format that creates a `basic_formatted_string` instead of a `basic_string`. This change allows for more efficient string formatting without the need for intermediate string allocations. However, it introduces issues, particularly with type deduction, leading to potential dangling references and incompatibility with existing functions that expect `basic_string`. Users express concerns over complexity, the proposal's actual targeting, and the challenges in handling string translations. There's also a call for better memory management practices to avoid misuse of types that can lead to undefined behavior. Some users highlight the growing demand for modern language features due to increased competition for C++.
0 Answers