Return the entry with the specified key, or Default.
Synopsis
Declared in <llvm/ADT/DenseMap.h>
template<typename U = std::remove_cv_t<ValueT>>
[[nodiscard]]
ValueT
lookup_or(
const_arg_type_t<KeyT> Val,
U&& Default) const;
Description
This variant is useful when lookup cannot be used with non‐default‐constructible values.
Return Value
The mapped value for Val, or Default if absent.
|
Note
|
The return value should not be discarded. |
Parameters
Name |
Description |
Val |
Key to look up. |
Default |
Value returned when |
Created with MrDocs