On Tue, 1 Dec 2009 13:37:13 -0600, John Peterson <[email protected]> wrote: > Here, A::f is like the ExactSolution::exact_value(...) function and > classes B and C are user-defined classes which only have to implement > a function "f()" with the same name and proper calling syntax.
This is a horrible abuse of templates unless you desperately need to avoid the 5-cycle hit of the indirect function call. The interface is never explicitly defined (so error messages suck), you have to dump the implementation into the header, and code can no longer operate generically on instances without templating over it (thus also going in the header). Jed ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ Libmesh-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-devel
