[libcxx-commits] [libcxx] [libcxx] Optimize std::generate for segmented iterators (PR #163006)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 15 22:55:35 PDT 2025
================
@@ -9,19 +9,36 @@
#ifndef _LIBCPP___ALGORITHM_GENERATE_H
#define _LIBCPP___ALGORITHM_GENERATE_H
+#include <__algorithm/for_each.h>
#include <__config>
+#include <__utility/forward.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
+namespace __generate {
+
+template <typename _Generator>
----------------
frederick-vs-ja wrote:
We conventionally use keyword `class` to introduce template parameters in standard libc++ headers. Sometimes `typename` is used, but its usages are far less than `class`.
https://github.com/llvm/llvm-project/pull/163006
More information about the libcxx-commits
mailing list