template<class T>
struct bsls::ProtocolTest_IsAbstract< T >
This class template is a compile-time meta-function, parameterized with type T
, the output of which is value
, which will be true
if T
is abstract and false
otherwise. On some platforms, the IsAbstract
test makes use of the fact that a type 'an array of objects of an abstract type' (e.g., T[1]
) cannot exist. Note that it is only an approximation, because this is also true for an incomplete type. But, this approximation is good enough for the purpose of testing protocol classes. On certain other platforms, the IsAbstract
test will make use of the fact that abstract types cannot be returned. This approximation also has issues, noted below, but is also good enough for the purpose of testing protocol classes.
This component-private, meta-function struct
template provides a compile-time constant value
class member with the value true
if the supplied T
type is an abstract class type, and provides a value
class member with the value false
otherwise. This meta-function matches the behavior std::is_abstract
would have if it were available on C++03 platforms.