소스 컴파일 시
설치시 기본 제공되는 vector 라이브러리 쪽에서
undefined symbol '_Ty' 라며 컴파일 에러가 뜨는데 원인이 뭘까요...
구글에 검색해도 안 나와 답답하여 질문 남겼습니다..
_Ty _Tmp = _Val; // in case _Val is in sequence <<- 이부분에서 Error 가 뜹니다
-----------------------------------------------------------
Error가 발생한 vector 함수 입니다..
void _Insert_n(iterator _Where,
size_type _Count, const _Ty& _Val)
{ // insert _Count * _Val at _Where
#if _HAS_ITERATOR_DEBUGGING
if (_Where._Mycont != this
|| _Where._Myptr < _Myfirst || _Mylast < _Where._Myptr)
_DEBUG_ERROR("vector insert iterator outside range");
#endif /* _HAS_ITERATOR_DEBUGGING */
size_type _Capacity = capacity();
if (_Count == 0)
;
else if (max_size() - size() < _Count)
_Xlen(); // result too long
else if (_Capacity < size() + _Count)
{ // not enough room, reallocate
_Capacity = max_size() - _Capacity / 2 < _Capacity
? 0 : _Capacity + _Capacity / 2; // try to grow by 50%
if (_Capacity < size() + _Count)
_Capacity = size() + _Count;
pointer _Newvec = this->_Alval.allocate(_Capacity);
pointer _Ptr = _Newvec;
_TRY_BEGIN
_Ptr = _Ucopy(_Myfirst, _VEC_ITER_BASE(_Where),
_Newvec); // copy prefix
_Ptr = _Ufill(_Ptr, _Count, _Val); // add new stuff
_Ucopy(_VEC_ITER_BASE(_Where), _Mylast, _Ptr); // copy suffix
_CATCH_ALL
_Destroy(_Newvec, _Ptr);
this->_Alval.deallocate(_Newvec, _Capacity);
_RERAISE;
_CATCH_END
_Count += size();
if (_Myfirst != 0)
{ // destroy and deallocate old array
_Destroy(_Myfirst, _Mylast);
this->_Alval.deallocate(_Myfirst, _Myend - _Myfirst);
}
#if _HAS_ITERATOR_DEBUGGING
this->_Orphan_all();
#endif /* _HAS_ITERATOR_DEBUGGING */
_Myend = _Newvec + _Capacity;
_Mylast = _Newvec + _Count;
_Myfirst = _Newvec;
}
else if ((size_type)(_Mylast - _VEC_ITER_BASE(_Where)) < _Count)
{ // new stuff spills off end
_Ty _Tmp = _Val; // in case _Val is in sequence
_Ucopy(_VEC_ITER_BASE(_Where), _Mylast,
_VEC_ITER_BASE(_Where) + _Count); // copy suffix
_TRY_BEGIN
_Ufill(_Mylast, _Count - (_Mylast - _VEC_ITER_BASE(_Where)),
_Tmp); // insert new stuff off end
_CATCH_ALL
_Destroy(_VEC_ITER_BASE(_Where) + _Count, _Mylast + _Count);
_RERAISE;
_CATCH_END
_Mylast += _Count;
#if _HAS_ITERATOR_DEBUGGING
_Orphan_range(_Where._Myptr, _Mylast);
#endif /* _HAS_ITERATOR_DEBUGGING */
_STD fill(_VEC_ITER_BASE(_Where), _Mylast - _Count,
_Tmp); // insert up to old end
}
else
{ // new stuff can all be assigned
_Ty _Tmp = _Val; // in case _Val is in sequence
pointer _Oldend = _Mylast;
_Mylast = _Ucopy(_Oldend - _Count, _Oldend,
_Mylast); // copy suffix
#if _HAS_ITERATOR_DEBUGGING
_Orphan_range(_Where._Myptr, _Mylast);
#endif /* _HAS_ITERATOR_DEBUGGING */
_STD copy_backward(_VEC_ITER_BASE(_Where), _Oldend - _Count,
_Oldend); // copy hole
_STD fill(_VEC_ITER_BASE(_Where), _VEC_ITER_BASE(_Where) + _Count,
_Tmp); // insert into hole
}
}
|