The underlying std::string is freed?
The underlying std::string is freed?
Posted Jul 9, 2024 17:52 UTC (Tue) by NYKevin (subscriber, #129325)In reply to: The underlying std::string is freed? by mathstuf
Parent article: New features in C++26
The main problem with this approach is that cache invalidation is hard. But I'm not sure how many CMake files you're going to parse in one run of your program, so I don't know if that's actually a problem or not. Probably you can have a per-file cache if needed.
Posted Jul 12, 2024 14:53 UTC (Fri)
by mathstuf (subscriber, #69389)
[Link]
```
would end up interning O(N²) string data to store the "real" value of `absolute_sources` across the loop.
CMake's inspirations came from Tcl (which is why it is stringly-typed) and the backwards compatibility guarantees make it very hard to actually break away from that.
The underlying std::string is freed?
foreach (item IN LISTS some_glob_result)
list(APPEND absolute_sources "${CMAKE_CURRENT_SOURCE_DIR}/${item}")
endforeach ()
```