
25 Mar
2010
25 Mar
'10
2:40 a.m.
I'm using googlemock to do some unit-testing via mock objects and I'm getting compiler errors on some of my mock methods. Because googlemock has some sophisticated meta-template programming techniques to allow it to print out the arguments passed to a mock method, I'm getting compiler errors on some of the methods that have incomplete types used as arguments. Is there anyway via boost::/tr1:: type_traits that I can detect this situation and have the gmock PrintTo template function just print "incomplete". I was hoping to find a nice "is_complete<T>" template function that would do the trick, but haven't found such a thing. Is it even possible to detect it without causing a compiler error? Michael