|
|
@@ -1846,7 +1846,7 @@ inline bool meta_sequence_container::reserve(const size_type sz) {
|
|
|
*/
|
|
|
inline meta_sequence_container::iterator meta_sequence_container::insert(const iterator &it, meta_any value) {
|
|
|
// this abomination is necessary because only on macos value_type and const_reference are different types for std::vector<bool>
|
|
|
- if(const auto vtype = value_type_node(internal::meta_context::from(*ctx)); !const_only && (value.allow_cast({*ctx, vtype}) || value.allow_cast({*ctx, const_reference_node(internal::meta_context::from(*ctx))}))) {
|
|
|
+ if(const auto &vtype = value_type_node(internal::meta_context::from(*ctx)); !const_only && (value.allow_cast({*ctx, vtype}) || value.allow_cast({*ctx, const_reference_node(internal::meta_context::from(*ctx))}))) {
|
|
|
const bool is_value_type = (value.type().info() == *vtype.info);
|
|
|
return insert_fn(*ctx, const_cast<void *>(data), is_value_type ? value.base().data() : nullptr, is_value_type ? nullptr : value.base().data(), it);
|
|
|
}
|