[#BloombergLP-bslstl-Variant_OverloadSetImp-07]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::Variant&lowbar;OverloadSetImp
:relfileprefix: ../../
:mrdocs:

This component&hyphen;private metafunction computes an overload set consisting of one function, named `candidate`, for each type in (template parameters) `t&lowbar;HEAD, t&lowbar;TAIL&period;&period;&period;`, having one parameter of that type&period; Each such function participates in overload resolution only when `std&colon;&colon;declval&lt;t&lowbar;SRC&gt;()` is convertible to the alternative without narrowing, and returns `bsl&colon;&colon;integral&lowbar;constant&lt;t&lowbar;INDEX &plus; i&gt;`, where `i` is the zero&hyphen;based index of the corresponding alternative&period; Note that a type that occurs multiple times in `t&lowbar;HEAD, t&lowbar;TAIL&period;&period;&period;` (possibly with varying cv&hyphen;qualifications) will only result in the generation of a single candidate&period; This implementation relies on expression SFINAE, `decltype`, `std&colon;&colon;declval`, and P1957R2&semi; since these features are not available in C&plus;&plus;03, the C&plus;&plus;03 version requires an exact match modulo cv&hyphen;qualification&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;variant&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;SRC,
    size&lowbar;t t&lowbar;INDEX,
    class t&lowbar;HEAD,
    class&period;&period;&period; t&lowbar;TAIL&gt;
struct Variant&lowbar;OverloadSetImp
    : Variant&lowbar;OverloadSetImp&lt;t&lowbar;SRC, t&lowbar;INDEX &plus; 1, t&lowbar;TAIL&period;&period;&period;&gt;
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `Variant&lowbar;OverloadSetImp&lt;t&lowbar;SRC, t&lowbar;INDEX &plus; 1, t&lowbar;TAIL&period;&period;&period;&gt;`
| This component&hyphen;private metafunction computes an overload set consisting of one function, named `candidate`, for each type in (template parameters) `t&lowbar;HEAD, t&lowbar;TAIL&period;&period;&period;`, having one parameter of that type&period; Each such function participates in overload resolution only when `std&colon;&colon;declval&lt;t&lowbar;SRC&gt;()` is convertible to the alternative without narrowing, and returns `bsl&colon;&colon;integral&lowbar;constant&lt;t&lowbar;INDEX &plus; i&gt;`, where `i` is the zero&hyphen;based index of the corresponding alternative&period; Note that a type that occurs multiple times in `t&lowbar;HEAD, t&lowbar;TAIL&period;&period;&period;` (possibly with varying cv&hyphen;qualifications) will only result in the generation of a single candidate&period; This implementation relies on expression SFINAE, `decltype`, `std&colon;&colon;declval`, and P1957R2&semi; since these features are not available in C&plus;&plus;03, the C&plus;&plus;03 version requires an exact match modulo cv&hyphen;qualification&period;
|===

== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/Variant_OverloadSetImp-07/candidate-01.adoc[`candidate`] 
| Overload candidate selecting alternative `t&lowbar;INDEX` for source type `t&lowbar;SRC`&period;
|===


== 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&lowbar;OverloadSetImp&lt;t&lowbar;SRC, t&lowbar;INDEX, t&lowbar;HEAD&gt;`] 
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| `Variant&lowbar;OverloadSetImp` 
| This component&hyphen;private metafunction computes an overload set consisting of one function, named `candidate`, for each type in (template parameters) `t&lowbar;HEAD, t&lowbar;TAIL&period;&period;&period;`, having one parameter of that type&period; Each such function participates in overload resolution only when `std&colon;&colon;declval&lt;t&lowbar;SRC&gt;()` is convertible to the alternative without narrowing, and returns `bsl&colon;&colon;integral&lowbar;constant&lt;t&lowbar;INDEX &plus; i&gt;`, where `i` is the zero&hyphen;based index of the corresponding alternative&period; Note that a type that occurs multiple times in `t&lowbar;HEAD, t&lowbar;TAIL&period;&period;&period;` (possibly with varying cv&hyphen;qualifications) will only result in the generation of a single candidate&period; This implementation relies on expression SFINAE, `decltype`, `std&colon;&colon;declval`, and P1957R2&semi; since these features are not available in C&plus;&plus;03, the C&plus;&plus;03 version requires an exact match modulo cv&hyphen;qualification&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
