Assert that C has a single element and return that element.

Synopsis

Declared in <llvm/ADT/STLExtras.h>

template<typename ContainerTy>
decltype(auto)
getSingleElement(ContainerTy&& C);

Return Value

The sole element of C.

Parameters

Name

Description

C

Container or range expected to hold one element.

Created with MrDocs