"Jaap Suter" <[EMAIL PROTECTED]> writes:

>> First thing to note is that you leave out "typename" all over the
>> place.  Try testing your examples with GCC-3.2.
>
> Yeah, I noticed. I had the same problem when porting my own code from Intel
> to GCC. Strange that the strongly-conforming Intel compiler doesn't issue a
> warning for it.

Intel C++ for Windows runs in a "Microsoft Bug-Compatible Mode" by
default.  Try adding -QAnsi to the command-line.

>> One more hint you should use as an item:  "Use inheritance to forward
>> metafunction results".  So:
>
> Awesome! I hadn't thought of this one before. Thanks!! And added to the
> WIKI.
> Small question: is struct inheritance public by default, 

Yes.

> or did you forget a 'public' there?

No.

>> Lastly, I know that Aleksey will argue with me about this, but I have
>> a strong preference for "class" rather than "typename" in template
>> parameter lists.
>
> Haha, I did not add an item to the WIKI, because I don't think it's
> good to promote something if even the MPL itself doesn't use it.

I think we really need a survey, because the syntax of templates is
difficult enough without introducing unneccessary confusion.

> However, you did convince me, mostly because it allows me to do easier
> global-search-and-replaces for typename to BOOST_DEDUCED_TYPENAME :) hehe.

There are so many reasons...

See, even automated tools find it less confusable when you write 'class' ;-)

-- 
                       David Abrahams
   [EMAIL PROTECTED] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to