Stroustrup's talk on C++0x

Sean Kelly sean at f4.ca
Sun Aug 26 15:14:04 PDT 2007


Walter Bright wrote:
> Sean Kelly wrote:
>> The obvious disadvantage to this approach is that is requires 
>> implementation of an interface by the creator of the object.  More 
>> often, I use an additional value parameter to specialize against:
>>
>> template Foo(T, bool isValid : true = PassesSomeTest!(T)) {}
>>
>> This also works for non-class types.  I'm not sure I like the syntax 
>> quite as much as concepts here, but it's good enough that I haven't 
>> really missed them.
> 
> This is a brilliant idea. It would make for a great article! Can I press 
> you to write it? Doesn't have to be long, just explain the concept(!) 
> and flesh it out with a few examples.

Sure thing. :-)


Sean



More information about the Digitalmars-d mailing list