Re: [pushed] c++: avoid initializer_list [PR105838]

2022-12-14 Thread Stephan Bergmann via Gcc-patches
On 12/8/22 19:41, Jason Merrill via Gcc-patches wrote: Tested x86_64-pc-linux-gnu, applying to trunk. Bisecting shows this started to break $ cat test.cc #include template struct ConstCharArrayDetector; template struct ConstCharArrayDetector { using Type = int; }; struct OUString { temp

[pushed] c++: avoid initializer_list [PR105838]

2022-12-08 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- When constructing a vector from { "strings" }, first is built an initializer_list, which is then copied into the strings in the vector. But this is inefficient: better would be treat the { "strings" } as a range and construct the strings in