On Sat, Jun 8, 2013 at 8:34 AM, Andrew Sutton <andrew.n.sut...@gmail.com> wrote:
>> template<term_list& (*proj)(proof_goal&)> >> tree >> extract_goals (proof_state& s) >> ... >> return extract_goals<assumptions>(s); >> >> but I suppose STL style is OK, too. > > > Huh. I didn't realize that could be inlined. Neat. We do -- we have been doing so for quite some time now, including devirtualization and inlining of functions with internal linkage. The reason why I tend to prefer the function argument style over template argument-style is where I don't want to specify everything, but rather prefer type deduction. Which in my case is almost aways. There is one thing though: C++03 does not allow using a function with internal linkage or no linkage as template arguments. If you put the function in an unnamed namespace you would expect GCC to treat is as if it was of internal linkage for many purposes including automatic inlining, but it doesn't :-( For example, you lose the "defined but not used warning", and the "used but not defined" warnings :-(( -- Gaby