Work around compiler problems on MSVC 16.6.X
The compiler apparently doesn't resolve the emplace overload correctly to the rvalue version, leading to infinite recursion in the overload that takes a const Key & as argument. Take a copy to make it explicit. Change-Id: I22039d6ca1e2176c81e51b181c72f511dab662f7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>bb10
parent
eb201a57db
commit
19b5520abf
|
|
@ -1121,7 +1121,8 @@ public:
|
|||
template <typename ...Args>
|
||||
iterator emplace(const Key &key, Args &&... args)
|
||||
{
|
||||
return emplace(Key(key), std::forward<Args>(args)...);
|
||||
Key copy = key; // Needs to be explicit for MSVC 2019
|
||||
return emplace(std::move(copy), std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
template <typename ...Args>
|
||||
|
|
|
|||
Loading…
Reference in New Issue