Re: [Cppunit-devel] templatized assertions
Brought to you by:
blep
From: Steve M. R. <ste...@vi...> - 2001-05-17 03:07:33
|
On Wed, May 16, 2001 at 09:28:06PM +0200, Baptiste Lepilleur wrote: > I would use a trait to add the object to the stream. The trait generic > implementation would use '<<', but could be specialized when needed. That sounds like a reasonable idea. I'm not terribly experienced in traits; what would be a good name for the function? Some of CppUnit already uses "toString", which seems reasonable enough, yes? > Also, since it is a template member, if should be protected with a define. > VC++ 5.0 (and many other compiler I guess) does not support template member > for example (though it a static member so I'm not sure). I'm not very knowledgable about the state of support for various features of the language. What is the workaround for compilers that don't support template static members? Actually: why does TestAssert need to be a class at all? There are no data members, so why not just make it a namespace with a bunch of templatized functions? -S -- by Rocket to the Moon, by Airplane to the Rocket, by Taxi to the Airport, by Frontdoor to the Taxi, by throwing back the blanket and laying down the legs ... - They Might Be Giants |