From: David Abrahams (dave_at_[hidden])
Date: 2003-01-02 08:35:16
"Jaap Suter" <J.Suter_at_[hidden]> 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
> Small question: is struct inheritance public by default,
> or did you forget a 'public' there?
>> 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 dave_at_[hidden] * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk