Google video about consepts

Reiner Pope reiner at none.com
Sun Apr 8 17:46:38 PDT 2007


Knud Soerensen wrote:
> Hi 
> 
> I found this interesting google video.
> 
> Concepts: Extending C++ Templates For Generic Programming
> http://video.google.com/videoplay?docid=-1790714981047186825&hl=en

I've made an implementation of concepts (just declares methods and 
allows some inheritance), which is attached. It is quite clean overall 
-- I think it has the potential to do most of C++0x Concepts, except for 
overloading (which is a big lack).

It already allows two main features, though: checking it is instantiated 
correctly (and it even gives very nice error messages like  static 
assert  "Type 'MyFourthInterface' has no method with signature 'char[] 
anotherMethod(bool)'.") and checking that you haven't cheated when 
writing your templates, expecting things you haven't documented.

It does the former with static if and is(), and it does the latter by 
constructing a minimalistic implementation and instantiating the 
template; the compiler then will pick up any errors.

Enjoy!

Reiner

-------------- next part --------------
A non-text attachment was scrubbed...
Name: concepts.d
Type: text/x-dsrc
Size: 5079 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20070409/c44380c6/attachment.d>


More information about the Digitalmars-d mailing list