[cfe-dev] Clang getting involved
Jonathan 'Rynn' Sauer
jonathan.sauer at gmx.de
Sat Mar 8 23:31:40 PST 2014
Hello,
>> FYI Stroustrup shot that feature down pretty hard
> <http://isocpp.org/blog/2013/03/n3613-static-if-considered>. It may not be
> the best one to implement.
>
> Yes, I know. But I hoped to see it like an extension. Just interesting, can
> it be helpful?
FWIW: Clang supports Microsoft's __if_exists extension when in VisualC++ mode:
<http://msdn.microsoft.com/en-us//library/x7wy9xh3.aspx> It is similar (although
more restrictive) to "static if".
I'm not sure if a clang-specific language extension would be accepted into clang,
although it could be used to evaluate the usefulness of "static if". But then
I'm biased as I'd very much like "static if" to become part of the C++ standard;
even though it's viral, as Stroustrup writes, it would reduce the need for helper
templates.
Jonathan
More information about the cfe-dev
mailing list