compiler construction - C++0x TMP compilation speed -


this question focuses on template metaprogramming constructs. have found 2 articles (one , two, 2 doesn't show hard evidence, trust claims) provide evidence showing c++0x prototype compilers turn exponential compilation times linear compilation times.

i have vague inkling auto, decltype , variadic templates have enablers of this. see ground explanation of changes languages , compiler technologies enable this, explaining how , why.

in terms of skill level, have used boost tmp library spirit in anger, , toy mpl programs.

it's clear first slower process compiler second , there is, say, evidence that.

/* first */ template<typename a> void f(a const&); template<typename a> void f(a&);  template<typename a1, typename a2> void f(a1 const&, a2&); template<typename a1, typename a2> void f(a1&, a2 const&); template<typename a1, typename a2> void f(a1 const&, a2 const&); template<typename a1, typename a2> void f(a1&, a2&);  // ...  /* second */ template<typename ...t> void f(t &&...); 

i know of no workaround generic auto in c++. simulating auto requires hundreds if not thousands of lines of codes (see boost.typeof) , it's still not generic. same decltype.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -