Boost logo

Boost Users :

Subject: [Boost-users] Using type_trait-like functionality to detect incomplete types
From: Michael Cox (mhcox_at_[hidden])
Date: 2010-03-24 22:40:58


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net