[#BloombergLP-bdlat_ChoiceFunctions-hasSelection-02]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlat_ChoiceFunctions.adoc[bdlat&lowbar;ChoiceFunctions]::hasSelection
:relfileprefix: ../../
:mrdocs:

`hasSelection` overloads

== Synopses

Declared in `&lt;bdlat&lowbar;choicefunctions&period;h&gt;`

Return true if the specified `object` has a selection with the specified `selectionId`, and false otherwise&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
bool
xref:BloombergLP/bdlat_ChoiceFunctions/hasSelection-0a.adoc[hasSelection](
    TYPE const& object,
    int selectionId);
----

[.small]#xref:BloombergLP/bdlat_ChoiceFunctions/hasSelection-0a.adoc[_» more&period;&period;&period;_]#

Return true if the specified `object` has a selection with the specified `selectionName` of the specified `selectionNameLength`, and false otherwise&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
bool
xref:BloombergLP/bdlat_ChoiceFunctions/hasSelection-03.adoc[hasSelection](
    TYPE const& object,
    char const* selectionName,
    int selectionNameLength);
----

[.small]#xref:BloombergLP/bdlat_ChoiceFunctions/hasSelection-03.adoc[_» more&period;&period;&period;_]#

== Return Value

* `true` if `object` has the selection, and `false` otherwise
* `true` if `object` has the named selection, and `false` otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *object*
| choice object to query
| *selectionId*
| id of the selection to look up
| *selectionName*
| name of the selection to look up
| *selectionNameLength*
| length of `selectionName`
|===


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