here - Chara - University of Illinois at Urbana-Champaign
here - Chara - University of Illinois at Urbana-Champaign
here - Chara - University of Illinois at Urbana-Champaign
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Lecture<br />
04—Templ<strong>at</strong>e<br />
P<strong>at</strong>terns I<br />
Chase Geigle<br />
Announcements<br />
Templ<strong>at</strong>e<br />
Specializ<strong>at</strong>ion<br />
Partial<br />
Templ<strong>at</strong>e<br />
Specializ<strong>at</strong>ion<br />
Templ<strong>at</strong>e<br />
Templ<strong>at</strong>e<br />
Parameters<br />
Next Time<br />
Templ<strong>at</strong>e Specializ<strong>at</strong>ion<br />
Definition (Templ<strong>at</strong>e Specializ<strong>at</strong>ion)<br />
Templ<strong>at</strong>e Specializ<strong>at</strong>ion is a mechanism by which the<br />
behavior <strong>of</strong> a templ<strong>at</strong>e class or function is completely replaced<br />
with something else, based on a condition on one or more<br />
templ<strong>at</strong>e parameters.<br />
A “gotcha”: when specializing, you replace the entire<br />
function/class<br />
When we specialize vector, we’ll have to write the<br />
entire class again.