BloombergLP::bdlb::Variant_ReturnValueHelper

Component-private helper that detects a visitor ResultType.

Synopsis

Declared in <bdlb_variant.h>

template<class VISITOR>
struct Variant_ReturnValueHelper
    : bsl::integral_constant<bool, sizeof (Variant_ReturnValueHelper_Matcher::match<VISITOR>(0)) == sizeof(Variant_ReturnValueHelper_YesType)>

Description

Do not use. This meta-function checks whether the template parameter type VISITOR has the member ResultType defined using "SFINAE" (Substitution Failure Is Not An Error). A value of true indicates VISITOR::ResultType exists, and false otherwise.

Base Classes

NameDescription
bsl::integral_constant<bool, sizeof (Variant_ReturnValueHelper_Matcher::match<VISITOR>(0)) == sizeof(Variant_ReturnValueHelper_YesType)>Metafunction representing a compile-time constant of the specified (template parameter) t_TYPE with the specified (template parameter) t_VALUE.

Type Aliases

NameDescription
type Alias for this integral_constant specialization.
value_type Alias for the (template parameter) t_TYPE.

Member Functions

NameDescription
operator() Return a copy of the template argument t_VALUE.
operator t_TYPE Return a copy of the template argument t_VALUE.

Static Data Members

NameDescription
value The compile-time constant value of this metafunction.