<br><br><div class="gmail_quote">Le 19 janvier 2012 17:52, Jonathan Sauer <span dir="ltr"><<a href="mailto:jonathan.sauer@gmx.de">jonathan.sauer@gmx.de</a>></span> a écrit :<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">>> Do you know if the same apply (I would guess so) to std::strlen ?<br>
>><br>
>> It seems a pity that such a trivial function could not be constexpr as making it constexpr is actually dead simple. I wonder if it would be worth a Defect Report.<br>
>><br>
> This would seem very reasonable to me...<br>
<br>
</div>As well as a lot (all?) of the math functions in cmath. And clang's built-ins (__builtin_sin etc), too.<br>
<br>
<br>
What do you think?<br>
Jonathan<br></blockquote><div><br>I haven't followed the C11 proposal, is the "constexpr" idea addressed there or would it be a specific C++ issue ?<br><br>C++ imports a massive amount of C functions, and keeping their signature as-is will be a hindrance, I don't fancy the idea of recoding them all in pure C++ to allow such optimizations! It seems like at least the `std::` versions could be made `constexpr` when possible. <br>
<br>I am putting Howard in copy since this seems something libc++ would be interested in, and perhaps his C++ committee experience could help us here.<br><br>-- Matthieu<br></div></div>