[Openmp-commits] [openmp] [libomp] Add kmp_str_ref (ADT 1/2) (PR #176162)
Michael Kruse via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jun 3 06:59:01 PDT 2026
================
----------------
Meinersbur wrote:
`std::function` is a heavy object. Passing it by-value requires a heap allocation. It is also opaque to the compiler such that it cannot be inlined even if `drop_file` with a lambda is inlined. I'd also worry about it require linking to lib(std)c++ library. LLVM for instance has llvm::function_ref as a more lightweight alternative. C++26 also has std::function_ref
https://github.com/llvm/llvm-project/pull/176162
More information about the Openmp-commits
mailing list