tag:blogger.com,1999:blog-6646285475339095415.post7431637466782780937..comments2023-10-17T06:16:19.069-04:00Comments on C++ Trivia: Explicit Specialization and Explicit InstantiationC++ Triviahttp://www.blogger.com/profile/13687133438732833204noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-6646285475339095415.post-25764269157734181182011-10-25T13:15:58.642-04:002011-10-25T13:15:58.642-04:00These are two alternate syntaxes for specializatio...These are two alternate syntaxes for specialization:<br /> template <> int f(int &a);<br /> template <> f(int &a);<br /><br />An instantiation would have the syntax:<br />template int f(int &a);<br /><br />Note the lack of empty <> template braces for the instantiation.<br /><br />Also note that instantiation *after* specialization within the same TU is OK, but the converse will not compile.jimmy_hchttps://www.blogger.com/profile/08702729632525419265noreply@blogger.com