RE: [Cppunit-devel] STL concepts checking (was: Change done...)
Brought to you by:
blep
From: Baptiste L. <gai...@fr...> - 2001-06-12 11:44:44
|
Quoting Bastiaan Bakker <bas...@li...>: > > > > -----Oorspronkelijk bericht----- > > Van: Baptiste Lepilleur [mailto:bl...@cl...] > > Verzonden: Tuesday, June 12, 2001 9:20 AM > > Aan: cpp...@li... > > Onderwerp: Re: [Cppunit-devel] Change done... > > Is there a place where those STL concepts can be look up > > (my knowledge > > is empirical)? > > The June 2001 issue of Dr. Dobbs contains an article on C++ concept > checking. They refer to the Boost Concept Checking Library: > http://www.boost.org/libs/concept_check/concept_check.htm. Seems > interesting. Thanks. I knew about the boost library concept checking but never got farther than the introduction. I took the time to read a bit more and came to the following conclusion: Concept check can be added transparently to existing code. Can someone with some experience with the boost library confirm that ? For us, it would mean that we could go ahead and implements the unit test for those concepts, and later add compile time concept checking (some option to use boost?). First concept I'd like to add would be Assignable and CopyConstructible (I'm refering to boost concept which are more fine grained: http://www.boost.org/libs/concept_check/reference.htm ). Those are used for example in the unit tests for Exception and NotEqualException (they did reaveal some bugs...). The difficulty for us is that you need to specify how you compare two instances (for example, with Exception, I compare the result of what() for each instance). You also need to specify one or more instance that are used for the tests. I'm not sure of how do to that. I was thinking of using functors or something like that. Any ideas ? I would like the final form to be able to mesh well with existing macros, so you could simply add a few macro to check the concepts. > Of course the descriptions of the STL concepts themselves can be found > at > SGI's STL pages: http://www.sgi.com/tech/stl/ Thanks, this doc is really good. > > Good luck, > > Bastiaan --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html Language: English, French |