<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">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.<div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">Louis<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 18, 2019, at 04:27, vali asdas via libcxx-bugs <<a href="mailto:libcxx-bugs@lists.llvm.org" class="">libcxx-bugs@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--><div class=""><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div dir="ltr" data-setdir="false" class="">Hey there,</div><div dir="ltr" data-setdir="false" class=""><br class=""></div><div dir="ltr" data-setdir="false" class="">Line 322 here <span class=""><a href="https://github.com/llvm-mirror/libcxx/blob/master/include/variant" rel="nofollow" target="_blank" class="enhancr_card_4363589118">llvm-mirror/libcxx</a> 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.</span><div class=""><br class=""></div><div id="ydp7dc3ee08enhancr_card_4363589118" class="ydp7dc3ee08ymail-preserve-style ydp7dc3ee08yahoo-link-enhancr-card ydp7dc3ee08ymail-preserve-class" style="max-width:400px;font-family:"Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif" data-url="https://github.com/llvm-mirror/libcxx/blob/master/include/variant" data-type="YENHANCER" data-size="MEDIUM" contenteditable="false"><a href="https://github.com/llvm-mirror/libcxx/blob/master/include/variant" style="text-decoration: none !important;" class="ydp7dc3ee08yahoo-enhancr-cardlink" rel="nofollow" target="_blank"><table border="0" class="ydp7dc3ee08card-wrapper ydp7dc3ee08yahoo-ignore-table" cellpadding="0" cellspacing="0" style="max-width:400px"><tbody class=""><tr class=""><td width="400" class=""><table border="0" class="ydp7dc3ee08card ydp7dc3ee08yahoo-ignore-table" cellpadding="0" cellspacing="0" width="100%" style="max-width:400px;border-width:1px;border-style:solid;border-color:rgb(224, 228, 233);border-radius:2px"><tbody class=""><tr class=""><td class="ydp7dc3ee08card-primary-image-cell" background="https://s.yimg.com/lo/api/res/1.2/KxB1MAitW3a8MIqqAMVsGA--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://avatars2.githubusercontent.com/u/1386314?s=400&v=4.cf.jpg" bgcolor="#000000" valign="top" height="175" style="background-color: rgb(0, 0, 0); background-size: cover; position: relative; border-radius: 2px 2px 0px 0px; min-height: 175px;"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:0;left:0;"><v:fill type="frame" color="#000000" src="https://s.yimg.com/lo/api/res/1.2/KxB1MAitW3a8MIqqAMVsGA--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://avatars2.githubusercontent.com/u/1386314?s=400&v=4.cf.jpg"/></v:rect><![endif]--><table border="0" class="ydp7dc3ee08card-overlay-container-table ydp7dc3ee08yahoo-ignore-table" cellpadding="0" cellspacing="0" style="width:100%"><tbody class=""><tr class=""><td class="ydp7dc3ee08card-overlay-cell" background="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png" bgcolor="transparent" valign="top" style="background-color: transparent; border-radius: 2px 2px 0px 0px; min-height: 175px;"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:-18px;left:0;"><v:fill type="pattern" color="#000000" src="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png"/><v:textbox inset="0,0,20px,0"><![endif]--><table border="0" class="ydp7dc3ee08yahoo-ignore-table" height="175" style="width: 100%; min-height: 175px;"><tbody class=""><tr class=""><td class="ydp7dc3ee08card-richInfo2" style="text-align:left;padding:15px 0 0 15px;vertical-align:top"></td><td class="ydp7dc3ee08card-actions" style="text-align:right;padding:15px 15px 0 0;vertical-align:top"><div class="ydp7dc3ee08card-share-container"></div></td></tr></tbody></table><!--[if gte mso 9]></v:textbox></v:rect><![endif]--></td></tr></tbody></table></td></tr><tr class=""><td class=""><table border="0" align="center" class="ydp7dc3ee08card-info ydp7dc3ee08yahoo-ignore-table" cellpadding="0" cellspacing="0" style="background:#fff;position:relative;z-index:2;width:100%;max-width:400px;border-radius:0 0 2px 2px;border-top:1px solid rgb(224, 228, 233)"><tbody class=""><tr class=""><td style="background-color:#ffffff;padding:16px 0 16px 12px;vertical-align:top;border-radius:0 0 0 2px" class=""><img class="ydp7dc3ee08yahoo-ignore-inline-image ydp7dc3ee08card-object-1 ydp7dc3ee08ymail-preserve-class" src="https://s.yimg.com/nq/storm/assets/enhancrV2/23/logos/github.png" height="36" style="min-width:36px;margin-top:3px"></td><td style="vertical-align:middle;padding:12px 24px 16px 12px;width:99%;font-family:"Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;border-radius:0 0 2px 0" class=""><h2 class="ydp7dc3ee08card-title" style="font-size: 14px; line-height: 19px; margin: 0px 0px 6px; font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif; color: rgb(38, 40, 42);">llvm-mirror/libcxx</h2><div style="font-size: 12px; line-height: 16px; margin: 0px; color: rgb(151, 155, 167);" class="">Mirror of official libcxx git repository located at http://llvm.org/git/libcxx. Updated every five minutes. - ll...</div></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></a></div><div class=""><br class=""></div><div class=""><br class=""></div></div></div></div>_______________________________________________<br class="">libcxx-bugs mailing list<br class=""><a href="mailto:libcxx-bugs@lists.llvm.org" class="">libcxx-bugs@lists.llvm.org</a><br class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-bugs<br class=""></div></blockquote></div><br class=""></div></body></html>