[#BloombergLP-bslstl-Variant_OverloadSetImp-07] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::Variant_OverloadSetImp :relfileprefix: ../../ :mrdocs: This component‐private metafunction computes an overload set consisting of one function, named `candidate`, for each type in (template parameters) `t_HEAD, t_TAIL...`, having one parameter of that type. Each such function participates in overload resolution only when `std::declval<t_SRC>()` is convertible to the alternative without narrowing, and returns `bsl::integral_constant<t_INDEX + i>`, where `i` is the zero‐based index of the corresponding alternative. Note that a type that occurs multiple times in `t_HEAD, t_TAIL...` (possibly with varying cv‐qualifications) will only result in the generation of a single candidate. This implementation relies on expression SFINAE, `decltype`, `std::declval`, and P1957R2; since these features are not available in C++03, the C++03 version requires an exact match modulo cv‐qualification. == Synopsis Declared in `<bslstl_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_SRC, size_t t_INDEX, class t_HEAD, class... t_TAIL> struct Variant_OverloadSetImp : Variant_OverloadSetImp<t_SRC, t_INDEX + 1, t_TAIL...> ---- == Base Classes [cols="1,4"] |=== | Name| Description | `Variant_OverloadSetImp<t_SRC, t_INDEX + 1, t_TAIL...>` | This component‐private metafunction computes an overload set consisting of one function, named `candidate`, for each type in (template parameters) `t_HEAD, t_TAIL...`, having one parameter of that type. Each such function participates in overload resolution only when `std::declval<t_SRC>()` is convertible to the alternative without narrowing, and returns `bsl::integral_constant<t_INDEX + i>`, where `i` is the zero‐based index of the corresponding alternative. Note that a type that occurs multiple times in `t_HEAD, t_TAIL...` (possibly with varying cv‐qualifications) will only result in the generation of a single candidate. This implementation relies on expression SFINAE, `decltype`, `std::declval`, and P1957R2; since these features are not available in C++03, the C++03 version requires an exact match modulo cv‐qualification. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/Variant_OverloadSetImp-07/candidate-01.adoc[`candidate`] | Overload candidate selecting alternative `t_INDEX` for source type `t_SRC`. |=== == Using Declarations [cols="1"] |=== | Name | xref:BloombergLP/bslstl/Variant_OverloadSetImp-07/candidate-02.adoc[`candidate`] |=== == Specializations [cols="1"] |=== | Name | xref:BloombergLP/bslstl/Variant_OverloadSetImp-03.adoc[`Variant_OverloadSetImp<t_SRC, t_INDEX, t_HEAD>`] |=== == Derived Classes [cols="1,4"] |=== | Name| Description | `Variant_OverloadSetImp` | This component‐private metafunction computes an overload set consisting of one function, named `candidate`, for each type in (template parameters) `t_HEAD, t_TAIL...`, having one parameter of that type. Each such function participates in overload resolution only when `std::declval<t_SRC>()` is convertible to the alternative without narrowing, and returns `bsl::integral_constant<t_INDEX + i>`, where `i` is the zero‐based index of the corresponding alternative. Note that a type that occurs multiple times in `t_HEAD, t_TAIL...` (possibly with varying cv‐qualifications) will only result in the generation of a single candidate. This implementation relies on expression SFINAE, `decltype`, `std::declval`, and P1957R2; since these features are not available in C++03, the C++03 version requires an exact match modulo cv‐qualification. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#