<div dir="ltr">Following r217961, mclow asked me to verify that it didn't interfere too badly with inlining of these calls on clang, and to send a summary here for the record.<br><br>I used the following (trivial) test:<br><br><font face="courier new, monospace">    #include <string><br><br>    int main(int argc, char** argv) {<br>      // Use values from argv to prevent the result from being</font><div><font face="courier new, monospace">      // constexpr evaluated.<br>      if (std::char_traits<char>::eq(argv[1][0], argv[1][1])) {<br>        return 0;<br>      } else {<br>        return 1;<br>      }<br>    }</font><br><br>Level 2 and 3 both inline the call, before and after r217961:<div><span style="font-family:'courier new',monospace">$ clang -O2 ...</span></div><div><span style="font-family:'courier new',monospace">$ objdump -d a.out</span><font face="courier new, monospace"><br>0000000000400670 <main>:<br>  400670:       48 8b 46 08             mov    rax,QWORD PTR [rsi+0x8]<br>  400674:       0f b6 48 01             movzx  ecx,BYTE PTR [rax+0x1]<br>  400678:       0f b6 00                movzx  eax,BYTE PTR [rax]<br>  40067b:       39 c8                   cmp    eax,ecx<br>  40067d:       0f 95 c0                setne  al<br>  400680:       0f b6 c0                movzx  eax,al<br>  400683:       c3                      ret    <br>  400684:       66 2e 0f 1f 84 00 00    nop    WORD PTR cs:[rax+rax*1+0x0]<br>  40068b:       00 00 00<br>  40068e:       66 90                   xchg   ax,ax</font><div><font face="courier new, monospace"><br></font></div><div>Before r217961, -O0 and -O1 both inline:</div><div><span style="font-family:'courier new',monospace">$ clang -O1 ...</span><br style="font-family:'courier new',monospace"><span style="font-family:'courier new',monospace">$ objdump -d a.out</span><br></div><div><div><font face="courier new, monospace">0000000000400670 <main>:</font></div><div><font face="courier new, monospace">  400670:       48 8b 46 08             mov    rax,QWORD PTR [rsi+0x8]</font></div><div><font face="courier new, monospace">  400674:       0f b6 48 01             movzx  ecx,BYTE PTR [rax+0x1]</font></div><div><font face="courier new, monospace">  400678:       0f b6 00                movzx  eax,BYTE PTR [rax]</font></div><div><font face="courier new, monospace">  40067b:       39 c8                   cmp    eax,ecx</font></div><div><font face="courier new, monospace">  40067d:       0f 95 c0                setne  al</font></div><div><font face="courier new, monospace">  400680:       0f b6 c0                movzx  eax,al</font></div><div><font face="courier new, monospace">  400683:       c3                      ret    </font></div><div><font face="courier new, monospace">  400684:       66 2e 0f 1f 84 00 00    nop    WORD PTR cs:[rax+rax*1+0x0]</font></div><div><font face="courier new, monospace">  40068b:       00 00 00 </font></div><div><font face="courier new, monospace">  40068e:       66 90                   xchg   ax,ax</font></div><div><br></div>After r217961, neither -O0 nor -O1 inline:</div><div><font face="courier new, monospace">$ clang -O1 ...<br>$ objdump -d a.out<br>...<br>  4006bc:       e8 0f 00 00 00          call   4006d0 <_ZNSt3__111char_traitsIcE2eqEcc><br>...</font></div></div></div><div><font face="courier new, monospace"><br></font></div><div><font face="arial, helvetica, sans-serif">Talked about this with mclow, and we're not worried about it, since it still inlines for the optimized modes, and the patch does fix compatibility with GCC.</font></div></div>