Stroustrup's talk on C++0x

Walter Bright newshound1 at digitalmars.com
Sun Aug 26 11:54:37 PDT 2007


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.



More information about the Digitalmars-d mailing list