BDE 4.14.0 Production release
|
#include <bdlb_variant.h>
Public Member Functions | |
Variant_RawVisitorHelper (VISITOR *visitor) | |
template<class ARGUMENT_TYPE > | |
RESULT_TYPE | operator() (ARGUMENT_TYPE &argument) |
template<class ARGUMENT_TYPE > | |
RESULT_TYPE | operator() (const ARGUMENT_TYPE &argument) |
template<class ARGUMENT_TYPE > | |
RESULT_TYPE | operator() (ARGUMENT_TYPE &argument) const |
template<class ARGUMENT_TYPE > | |
RESULT_TYPE | operator() (const ARGUMENT_TYPE &argument) const |
RESULT_TYPE | operator() (bslmf::Nil) const |
Do not call. The behavior of this method is undefined. | |
This struct
provides a helper for implementing Variant::applyRaw
that enables applyRaw
to support visitor functors that do not provide an overload for operator()(bslmf::Nil)
. Objects of this type are constructed using a functor of (template parameter) type VISITOR
, whose operator()
returns the (template parameter) type RESULT_TYPE
. A Variant_RawVisitorHelper
wraps a functor of type VISITOR
and provides an implementation of operator()(bslmf::Nil)
that performs a BSLS_ASSERT_OPT(false)
. Note that this overload is needed to enable compilation (specifically, to instantiate doApply
and doApplyR
), but is never invoked by any code path at runtime.
See bdlb_variant
|
inlineexplicit |
Create a RawVisitorHelper
functor that delegates to the specified visitor
.
|
inline |
Invoke the functor supplied at construction with the specified argument
, and return the result.
|
inline |
Invoke the functor supplied at construction with the specified argument
, and return the result.
RESULT_TYPE bdlb::Variant_RawVisitorHelper< RESULT_TYPE, VISITOR >::operator() | ( | bslmf::Nil | ) | const |
|
inline |
|
inline |