Merge pull request #129 from bennybp/master

Use emplace for casting to map
This commit is contained in:
Wenzel Jakob 2016-03-05 23:52:25 +01:00
commit 98e9210816

View File

@ -72,7 +72,7 @@ template <typename Type, typename Key, typename Value> struct map_caster {
if (!kconv.load(it.first.ptr(), convert) ||
!vconv.load(it.second.ptr(), convert))
return false;
value[(Key) kconv] = (Value) vconv;
value.emplace((Key) kconv, (Value) vconv);
}
return true;
}