<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've myself written something like the first, but the second approach suits my needs better. typeof(this) is very nice. </blockquote><div><br></div><div>It is. For mixin templates, it's a must.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I intend to use it (among other things) for multivectors, so the scalar type is not directly obtainable from the parts, but then, I can allow partwise multiplication with whatever type the parts may multiply. </blockquote>
<div><br></div><div>Yes, that can be tested at compile-time.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The nicest thing about the two approaches is that they are orthogonal - a single template mixin may implement them both!<br>

</blockquote></div><br><div>OK, great! Don't hesitate to ask if you're stuck.</div><div><br></div><div><br></div><div> </div>