Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why there is no `static_if` in C++11 [closed]

Tags:

c++

c++11

I wonder why such a natural thing like static_if did not manage to get into C++11? Some people object that using inheritance or template specialization we could achieve demanded results BUT:

Why don't we have a simple static_if for simple situations when one doesn't want to bloat up the source code with all that?

like image 765
Cartesius00 Avatar asked Dec 10 '12 10:12

Cartesius00


1 Answers

I suppose the commitee was short of time to discuss this feature so they decide to delay it after C++11. Anyway proposal is here: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3329.pdf

like image 134
zaufi Avatar answered Nov 20 '22 13:11

zaufi