On Thursday 10 March 2005 2:30 pm, John Lamb wrote:
Davi de Castro Reis wrote:
Yes. Boost has the concept_check stuff, but AFAIK, there is no runtime overhead at all. Also, you can guarantee the interface mixing templates and inheritance.
template <class T : public myInterfaceClassName> class ...
Pretty simple uh? But you rarely see people using it, because generic programming and traditional object programming seems to be some sort of competitors.
I couldn't find any reference to this in the draft standard or in Stroustrup and I couldn't get an example like this to compile in g++ 3.4.2 or 3.4.4 (though I know 3.4.2 won't accept some legal stuff like class : public class A { ... } object;) John, We are talking Java 1.5 where generics are introduced, not C++. -- Jerry Feldman
Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9