When working with C++20 views, creating functions that encapsulate complex view compositions might be tempting.
However, that will very likely lead to unnecessary data copies. Instead, consider compositing views as inline constexpr variables.
Compiler Explorer link: https://compiler-explorer.com/z/vG4hhe77h
@simontoth Hi Simon, read your blog post recently. Do you mean functions that do one or some of the range operations, and return std::string's, or functions that return view adapters?
@reed I meant wrapping this functionality into a trim function.