Quick Links: |
#include <bdlb_variant.h>
Static Public Member Functions | |
static TYPE | doNotCall (TYPE *dummy) |
static TYPE | doNotCall () |
This struct
provides a function that returns an (invalid) instance of any type. It is meant to allow clients to express:
template <RESULT_TYPE> RESULT_TYPE foo() { // ... // The following 'return' is unreachable, but is required for // compilation. return Variant_ReturnAnyTypeUtil::doNotCall(); }
where RESULT_TYPE
may be void
. Note that while such a return statement is not required by the C++ standard, the lack of such a return statement causes a warning (or error) with many compilers.
static TYPE bdlb::Variant_ReturnAnyTypeUtil< TYPE >::doNotCall | ( | TYPE * | dummy | ) | [static] |
Return the specified *dummy
.
static TYPE bdlb::Variant_ReturnAnyTypeUtil< TYPE >::doNotCall | ( | ) | [static] |
Return a TYPE
object.