Apply visitor to the held value of this modifiable variant.
Synopsis
Declared in <bdlb_variant.h>
template<class VISITOR>
VISITOR::ResultType
apply(VISITOR const& visitor)
requires Variant_ReturnValueHelper<VISITOR>::value == 1;
Description
If If this variant is unset, a default constructed bslmf::Nil is passed to the visitor. Note that this method is selected only if the template parameter type VISITOR defines a typedef of ResultType in its public interface. Also note that this method is defined inline to work around a Windows compiler bug with SFINAE functions.
Return Value
result of invoking visitor on the active alternative
Parameters
Name |
Description |
visitor |
callable applied to the active alternative |
Created with MrDocs