[libcxx-commits] [libcxx] [libcxx] Added segmented iterator for count_if (PR #105888)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Oct 19 07:58:31 PDT 2024
philnik777 wrote:
> > @adeel10x oh, sweet. Please file a bug against clang for the crash.
> > No, there isn't a specific requirement to make this work in C++11. If there isn't a good reason not to do it we should though. Given that the simple option makes clang crash this seems like a good reason to not do it. Please add a >= C++14 guard and link the bug report.
>
> Hi @philnik777, I'm a bit confused about the next step. Do you want me to add a `#if __cplusplus` guard like this at the file top and change the compilation command for this file?
>
> ```
> #if __cplusplus < 201402L
> #error "C++14 or better required\n"
> #endif
> ```
>
> If not, could you please tell me what guard I have to use here?
I think it'd actually be simpler to just refactor the lambda to a function object. That should definitely work in C++03. (Also, you'd want to use `#if _LIBCPP_STD_VER >= 14` when guarding against a version)
https://github.com/llvm/llvm-project/pull/105888
More information about the libcxx-commits
mailing list