Damn C++ and damn D!

On Sunday, 5 February 2012 at 14:24:20 UTC, Timon Gehr wrote:
> This should work:
>> #define DOTDOTDOT ...
>> template<class T> void fun(T a){
> if(cond<T>::value) {
> auto var = make(a);
> DOTDOTDOT;
> }else{
> auto tmp = make(a);
> auto var = make_proxy(tmp);
> DOTDOTDOT;
> }
> }
It won't work.
You now have two scopes and you have to repeat every line after
"var" for both scopes. Now you have to maintain both of them. And
this grows exponentially for every new condition you have.