Subject: Re: [boost] traits classes vs. metafunctions
From: Jonathan Wakely (jwakely.boost_at_[hidden])
Date: 2013-04-01 15:23:55


On 1 April 2013 19:35, Stefan Strasser wrote:
> Am 01.04.2013 00:49, schrieb Dave Abrahams:
>
>> There's a chance to support lots of things natively that nobody has yet
>> implemented, used, formalized, or proposed. Invent the mechanism and
>> put it in a real compiler, and *then* maybe, if it gets used, it will be
>> time to propose it for standardization.
>
>
>> I think you're missing the point. The committee tries hard not to
>> engage in feature invention, and in the rare cases when it does,
>> somebody creates an actual implementation of the feature.
>>
>
> then I don't think it'll ever happen. there is very little reason for
> compiler implementors to improve the syntax of an existing feature, as it
> will almost never be used unless it's standardized.
> the situation with metafunctions is more like c++11 lambdas. (I'm guessing
> here) committee members looked at other languages and library
> implementations of lambdas like Boost.Phoenix and saw the need for language
> support. Was there a production compiler that implemented language support
> for lambdas before it was standardized?

Yes. GCC 4.6 supports lambdas and was released 6 months before C++11
was published (on the day the FDIS was published, in fact.)

For a better example, Apple added support for their Blocks extension
to both GCC and Clang without it being in any standard.

Both GCC and Clang supported variadic templates long before C++11.
Extern templates and allowing types without linkage to be template
arguments were supported by several production compilers for many
years before being standardised.