$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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