Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Alexandrescu, Meyers, Sutter: On Static If, C++11 in 2012, Modern Libraries, and Metaprogramming
Aug 21, 2012 at 11:31 AMDavid: You're of course right. By and large I'm trying to minimize mentions of D in C++ contexts because it's as unfair as bringing a machine gun to a knife fight.
Andrei Alexandrescu: Three Unlikely Successful Features of D
Apr 12, 2012 at 3:49 PMMartin Nowak found a bug in my generalized palindrome implementation, sigh. There are many possible fixes, his proposed one being among the simplest.
The idea here is that if the range is left at exactly one element, it can't be reduced from both sides (one size suffices).
bool palindrome(Range)(Range range) {
for (; !range.empty; range.popFront(), range.empty || range.popBack()) {
if (range.front != range.back)
return false;
}
return true;
}
Variadic Templates are Funadic
Feb 07, 2012 at 12:44 AM@c9xeo: Apologies, you're right; I tried to simplify from a larger example I gave at C++ and Beyond and ended up bloating myself. The correct code is:
Thanks for the correction!
Variadic Templates are Funadic
Feb 06, 2012 at 11:45 PM@c9xeo: Actually the code is correct as is. Similarly, when you define a function that takes a pointer to a function you don't need to specify names for the inner parameters:
void fun(void (*pFun)(int xyz));
is the same as
void fun(void (*pFun)(int));
Variadic Templates are Funadic
Feb 06, 2012 at 4:43 PMI got word that the video is in processing and will come out later today. Thanks for your interest!
C&B 2011 Panel: Herb Sutter, Andrei Alexandrescu and Scott Meyers - C++11
Oct 21, 2011 at 9:27 AM@Garfield: Thanks for your comment. I believe I've argued my point properly, and my understanding is that Herb agreed with it. As @mcmcc mentioned, it's all rooted in the inescapable reality that creating a new composite object is sometimes more expensive than modifying an existing object. This issue gets compounded by repeated execution. As an example, we all know we do good to repeatedly refill the "current line" when reading text from a large file, as opposed to creating a new string upon each read. Rvalue references repair what could be considered a large gratuitous waste - but they don't do miracles, and we shouldn't expect them to.
Scott Meyers, Andrei Alexandrescu and Herb Sutter: C++ and Beyond
Aug 26, 2011 at 9:29 AMThanks, "true". Erwin Unruh indeed. In our defense, his name contains all of the letters in "Uwe" :o).