BDE 4.14.0 Production release
|
#include <bdlat_enumfunctions.h>
Static Public Member Functions | |
template<class TYPE > | |
static int | makeFallback (TYPE *result, bsl::true_type) |
template<class TYPE > | |
static int | makeFallback (TYPE *result, bsl::false_type) |
template<class TYPE > | |
static bool | hasFallback (const TYPE &value, bsl::true_type) |
template<class TYPE > | |
static bool | hasFallback (const TYPE &value, bsl::false_type) |
template<class TYPE > | |
static bool | isFallback (const TYPE &value, bsl::true_type) |
template<class TYPE > | |
static bool | isFallback (const TYPE &value, bsl::false_type) |
The below functions use tag dispatch to provide an implementation of the fallback-related operations that either delegate to the associated customization points or immediately return a non-zero value to indicate failure, depending on whether the type does or does not satisfy the HasFallbackEnumerator
trait, respectively. The purpose of doing this is so that the fallback-related operations can be used on any type, even enumeration types that do not have fallback enumerators.