[libcxx-bugs] compile-time expression in run-time evaluation
vali asdas via libcxx-bugs
libcxx-bugs at lists.llvm.org
Mon Jan 27 11:35:19 PST 2020
Hi. So why put constexpr at 319?
Pe luni, 27 ianuarie 2020, 21:12:21 EET, Louis Dionne <ldionne at apple.com> a scris:
We can’t use `if constexpr` there, since `__i` is not a constant expression from within the function. So `__matches[__i]` is not a constant expression.
It doesn’t matter though, since the function `__find_index` will always result in a constant expression, and so we wouldn’t gain anything from using `if constexpr` there.
Louis
On Jul 18, 2019, at 04:27, vali asdas via libcxx-bugs <libcxx-bugs at lists.llvm.org> wrote:
Hey there,
Line 322 here llvm-mirror/libcxx is an if with a constant expression inside. Shouldn't it be using if constexpr? It should be a direct replacement, since if constexpr and std::variant are both from C++ 17 anyway.Thanks.
|
|
|
| | |
|
|
|
| |
llvm-mirror/libcxx
Mirror of official libcxx git repository located at http://llvm.org/git/libcxx. Updated every five minutes. - ll... |
|
|
_______________________________________________
libcxx-bugs mailing list
libcxx-bugs at lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-bugs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-bugs/attachments/20200127/7205015b/attachment-0001.html>
More information about the libcxx-bugs
mailing list