We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Dear, I program in keil arm and use c++. I receive error: C:\Keil\ARM\ARMCC\Bin\..\include\vector.CC(120): error: #349: no operator "=" matches these operands operand types are: std::pair<CGXByteBuffer, CGXByteBuffer> = const std::pair<CGXByteBuffer, CGXByteBuffer> *__it = __x;
That warns for code:
template <class _TypeT, class _Allocator> void vector<_TypeT,_Allocator>::_C_insert_aux ( iterator __it, const_reference __x) { if (capacity () > size ()) { // avoid dereferencing end () by incrementing _C_finish first pointer __old_end = _C_finish; ++_C_finish; _TRY { _RWSTD_VALUE_ALLOC(_C_value_alloc_type, construct (__old_end, *(__old_end - difference_type (1)))); } _CATCH (...) { _RWSTD_VALUE_ALLOC(_C_value_alloc_type, destroy(__old_end)); --_C_finish; _RETHROW; } copy_backward (__it, _C_make_iter (__old_end - difference_type (1)) , _C_make_iter (__old_end)); *__it = __x; } else { // more memory needed size_t __new_capacity = _RW::__rw_new_capacity(size(),this); pointer __start = _RWSTD_VALUE_ALLOC(_C_value_alloc_type, allocate(__new_capacity, (void*)_C_start)); _TRY { uninitialized_copy(begin(), __it, __start, _RWSTD_VALUE_ALLOC_CAST (*this)); _RWSTD_VALUE_ALLOC(_C_value_alloc_type, construct((__start + (__it - begin())), __x)); uninitialized_copy(__it, end(), __start + (__it - begin()) + difference_type (1), _RWSTD_VALUE_ALLOC_CAST (*this)); } _CATCH (...) { _C_destroy (_C_make_iter (__start), _C_make_iter (__start + __new_capacity)); _RWSTD_VALUE_ALLOC(_C_value_alloc_type, deallocate (__start,__new_capacity)); _RETHROW; } // compute size before deallocating size_type __size = size (); _C_destroy (begin(), end()); // invalidates all iterators into '*this' _RWSTD_VALUE_ALLOC(_C_value_alloc_type, deallocate(_C_start, capacity ())); _C_start = __start; _C_finish = __start + __size + difference_type (1); _C_end_of_storage = __start + __new_capacity; } }
Please share your solution!