We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75c3ff8 commit 0838bd6Copy full SHA for 0838bd6
llvm/include/llvm/ADT/DenseMap.h
@@ -220,7 +220,8 @@ class DenseMapBase : public DebugEpochBase {
220
// Return the entry with the specified key, or \p Default. This variant is
221
// useful, because `lookup` cannot be used with non-default-constructible
222
// values.
223
- ValueT lookup_or(const_arg_type_t<KeyT> Val, ValueT &&Default) const {
+ template <typename U = std::remove_cv_t<ValueT>>
224
+ ValueT lookup_or(const_arg_type_t<KeyT> Val, U &&Default) const {
225
if (const BucketT *Bucket = doFind(Val))
226
return Bucket->getSecond();
227
return Default;
0 commit comments