Re: [PATCH] libstdc++: Fix constexpr basic_string union member [PR113294]

2024-02-12 Thread Jonathan Wakely
On Mon, 12 Feb 2024 at 22:17, Patrick Palka wrote: > On Mon, 12 Feb 2024, Paul Keir wrote: > > > A call to `basic_string::clear()` in the std::string move assignment > operator leads to a constexpr error from an access of inactive union member > `_M_local_buf` in the added test (`test_move()`). C

Re: [PATCH] libstdc++: Fix constexpr basic_string union member [PR113294]

2024-02-12 Thread Patrick Palka
On Mon, 12 Feb 2024, Paul Keir wrote: > A call to `basic_string::clear()` in the std::string move assignment operator > leads to a constexpr error from an access of inactive union member > `_M_local_buf` in the added test (`test_move()`). Changing > `__str._M_local_buf` to `__str._M_use_local_d

[PATCH] libstdc++: Fix constexpr basic_string union member [PR113294]

2024-02-12 Thread Paul Keir
A call to `basic_string::clear()` in the std::string move assignment operator leads to a constexpr error from an access of inactive union member `_M_local_buf` in the added test (`test_move()`). Changing `__str._M_local_buf` to `__str._M_use_local_data()` in `operator=(basic_string&& __str)` fix