BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Microsoft//Channel 9//EN
X-ORIGINAL-URL:http://channel9.msdn.com/Events/GoingNative/GoingNative-2012/Static-If-I-Had-a-Hammer
METHOD:PUBLISH
BEGIN:VEVENT
DESCRIPTION;LANGUAGE=en:All right\, the C+\;+\;11 Standard is done. Can we go home? Definitely not - progress waits for no one. For all its might\, C+\;+\;11 is not addressing a few basic needs in template programming. For example\, you'd hate to have to define a new function or indeed a whole new class wherever you need an &quot\;if&quot\; statement\; yet\, this is exactly what we do for template code. Also\, conditional overloading using the likes of std::enable_if is syntactically bulky and semantically ham-fisted (as is visible with constructors and other special functions). This talk describes a new proposal (joint work with Herb Sutter and Walter Bright): a &quot\;static if&quot\; construct that works much like &quot\;if&quot\;\, just during compilation. It's reminiscent of #if\, just done copiously right.With &quot\;static if&quot\; a lot of generic code becomes radically simpler\, which in turn enables idioms that today are too complex to be usable. This proposal for C+\;+\; benefits from a large body of experience within the D programming language.
LOCATION;LANGUAGE=en:${Model.Room.CleanForIcs()}
SUMMARY;LANGUAGE=en:Static If I Had a Hammer
CONTACT;LANGUAGE=en:Andrei Alexandrescu
UID:Code: 046c6a82-3d47-416b-a22e-9fd4012bf5e4
X-ALT-DESC;FMTTYPE=text/html:

All right, the C++11 Standard is done. Can we go home? Definitely not - progress waits for no one.

For all its might, C++11 is not addressing a few basic needs in template programming. For example, you'd hate to have to define a new function or indeed a whole new class wherever you need an "if" statement; yet, this is exactly what we do for template code. Also, conditional overloading using the likes of std::enable_if is syntactically bulky and semantically ham-fisted (as is visible with constructors and other special functions).

This talk describes a new proposal (joint work with Herb Sutter and Walter Bright): a "static if" construct that works much like "if", just during compilation. It's reminiscent of #if, just done copiously right.

With "static if" a lot of generic code becomes radically simpler, which in turn enables idioms that today are too complex to be usable. This proposal for C++ benefits from a large body of experience within the D programming language.