--- layout: stdlib-reference --- # select ## Description ## Signature
T select<T>(
bool condition,
T ifTrue,
T ifFalse);
vector<T, N> select<T, int N>(
vector<bool, N> condition,
vector<T, N> ifTrue,
vector<T, N> ifFalse);
Optional<T> select<T>(
bool condition,
__none_t ifTrue,
T ifFalse);
Optional<T> select<T>(
bool condition,
T ifTrue,
__none_t ifFalse);
## Generic Parameters
#### T
#### N : int
## Parameters
#### condition : bool
#### ifTrue : [T](select.html#typeparam-T)
#### ifFalse : [T](select.html#typeparam-T)
#### condition : [vector](../types/vector/index.html)\