--- layout: stdlib-reference --- # select ## Description ## Signature
T select<T>(
    bool condition,
    T ifTrue,
    T ifFalse);

vector<T, N> select<T, N:int>(
    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)\ #### ifTrue : [vector](../types/vector/index.html)\<[T](../types/vector/index.html#typeparam-T), [N](../types/vector/index.html#decl-N)\> #### ifFalse : [vector](../types/vector/index.html)\<[T](../types/vector/index.html#typeparam-T), [N](../types/vector/index.html#decl-N)\> #### ifTrue : \_\_none\_t #### ifFalse : \_\_none\_t