commit 2025-08-20 11:57 __FastMoveObj => ZftMoveFast
This commit is contained in:
@ -1440,14 +1440,14 @@ namespace ZNsMain
|
|||||||
|
|
||||||
■ 특수한 목적으로 쓰이는 전역 템플릿 함수는 여기에 놓는다.
|
■ 특수한 목적으로 쓰이는 전역 템플릿 함수는 여기에 놓는다.
|
||||||
|
|
||||||
■ __FastMoveObj<>(Type1& AR_Type1, Type2& AR_Type2)
|
■ ZftMoveFast<>(Type1& AR_Type1, Type2& AR_Type2)
|
||||||
|
|
||||||
차기 표준에서 구현하는 RValue Reference 를 흉내낸 함수다. Move 생성자와
|
차기 표준에서 구현하는 RValue Reference 를 흉내낸 함수다. Move 생성자와
|
||||||
Move 대입연산 중 대입연산만을 흉내내는 것이며, 일반적으로 이 함수 호출후에
|
Move 대입연산 중 대입연산만을 흉내내는 것이며, 일반적으로 이 함수 호출후에
|
||||||
AR_Type2 의 크기는 0 이 되거나 줄어들 것이다.
|
AR_Type2 의 크기는 0 이 되거나 줄어들 것이다.
|
||||||
|
|
||||||
해당 object 에 Move 대입연산이 필요하면 해당 object 를 인수로 갖는
|
해당 object 에 Move 대입연산이 필요하면 해당 object 를 인수로 갖는
|
||||||
__FastMoveObj() 함수 템플릿을 전문화하면 된다.
|
ZftMoveFast() 함수 템플릿을 전문화하면 된다.
|
||||||
|
|
||||||
■ 어느 함수 func()가 인수로 전달되는 object 의 초기/종료 멤버함수를 요구하는
|
■ 어느 함수 func()가 인수로 전달되는 object 의 초기/종료 멤버함수를 요구하는
|
||||||
경우, 그때마다 해당 object class 를 선언할 때, 특정한 이름의 초기/종료 멤버
|
경우, 그때마다 해당 object class 를 선언할 때, 특정한 이름의 초기/종료 멤버
|
||||||
@ -1461,20 +1461,20 @@ namespace ZNsMain
|
|||||||
///////////////////////////////////////////////////////////////////////////*/
|
///////////////////////////////////////////////////////////////////////////*/
|
||||||
|
|
||||||
template<typename Type1, typename Type2>
|
template<typename Type1, typename Type2>
|
||||||
void __FastMoveObj(Type1& AR_Type1, Type2& AR_Type2)
|
void ZftMoveFast(Type1& AR_Type1, Type2& AR_Type2)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG_FAST_MOVE_OBJ_
|
#ifdef _DEBUG_FAST_MOVE_OBJ_
|
||||||
cout<<" ※※ __FastMoveObj Start : Type1="<<typeid(Type1).name()<<", Type2="<<typeid(Type2).name()<<endl;
|
cout<<" ※※ ZftMoveFast Start : Type1="<<typeid(Type1).name()<<", Type2="<<typeid(Type2).name()<<endl;
|
||||||
#endif //_DEBUG_FAST_MOVE_OBJ_
|
#endif //_DEBUG_FAST_MOVE_OBJ_
|
||||||
|
|
||||||
AR_Type1=AR_Type2;
|
AR_Type1=AR_Type2;
|
||||||
|
|
||||||
#ifdef _DEBUG_FAST_MOVE_OBJ_
|
#ifdef _DEBUG_FAST_MOVE_OBJ_
|
||||||
cout<<" ※※ __FastMoveObj Close : Type2="<<typeid(Type1).name()<<", Type2="<<typeid(Type2).name()<<endl;
|
cout<<" ※※ ZftMoveFast Close : Type2="<<typeid(Type1).name()<<", Type2="<<typeid(Type2).name()<<endl;
|
||||||
#endif //_DEBUG_FAST_MOVE_OBJ_
|
#endif //_DEBUG_FAST_MOVE_OBJ_
|
||||||
}/*
|
}/*
|
||||||
template<typename Type1, typename Type2>
|
template<typename Type1, typename Type2>
|
||||||
void __FastMoveObj(Type& AR_Type1, Type& AR_Type2) */
|
void ZftMoveFast(Type& AR_Type1, Type& AR_Type2) */
|
||||||
|
|
||||||
|
|
||||||
template<typename Type> void __Init(Type& AR_Type)
|
template<typename Type> void __Init(Type& AR_Type)
|
||||||
@ -1646,7 +1646,7 @@ namespace ZNsMain
|
|||||||
cout<<" ※※ ZtCMoveObj<TTypeArg1, TTypeArg2, true> is called."<<endl;
|
cout<<" ※※ ZtCMoveObj<TTypeArg1, TTypeArg2, true> is called."<<endl;
|
||||||
#endif //_DEBUG_MOVEOBJ_EXEC
|
#endif //_DEBUG_MOVEOBJ_EXEC
|
||||||
|
|
||||||
ZNsFunc::__FastMoveObj(AR_TypeArg1, AR_TypeArg2);
|
ZNsFunc::ZftMoveFast(AR_TypeArg1, AR_TypeArg2);
|
||||||
}/*
|
}/*
|
||||||
static void Exec(TTypeArg1& AR_TypeArg1, TTypeArg2& AR_TypeArg2)*/
|
static void Exec(TTypeArg1& AR_TypeArg1, TTypeArg2& AR_TypeArg2)*/
|
||||||
|
|
||||||
@ -4171,7 +4171,7 @@ namespace ZNsCPP */
|
|||||||
|
|
||||||
-- 2009-03-08 21:28:00
|
-- 2009-03-08 21:28:00
|
||||||
|
|
||||||
■ 함수 템플릿의 템플릿 인수가 템플릿인 경우에는 어떻게 전문화하는지, CStringEx.H 의 std::__FastMoveObj() 의 CStringBase_T<>
|
■ 함수 템플릿의 템플릿 인수가 템플릿인 경우에는 어떻게 전문화하는지, ZtCStringEx.H 의 ZNsMain::ZftMoveFast() 의 ZtCStringBase<>
|
||||||
템플릿 전문화에 그 예가 있다.
|
템플릿 전문화에 그 예가 있다.
|
||||||
|
|
||||||
-- 2009-09-06 07:26:00
|
-- 2009-09-06 07:26:00
|
||||||
|
@ -8285,20 +8285,20 @@ namespace ZNsMain
|
|||||||
typename TTypCh , typename TAlloc,
|
typename TTypCh , typename TAlloc,
|
||||||
typename TAllocSize, typename TTypeString
|
typename TAllocSize, typename TTypeString
|
||||||
>
|
>
|
||||||
void __FastMoveObj ////////////////////////////////////////////////////////
|
void ZftMoveFast //////////////////////////////////////////////////////////
|
||||||
(
|
(
|
||||||
ZtCStringBase<TTypCh, TAlloc, TAllocSize, TTypeString>& AR_CString1,
|
ZtCStringBase<TTypCh, TAlloc, TAllocSize, TTypeString>& AR_CString1,
|
||||||
ZtCStringBase<TTypCh, TAlloc, TAllocSize, TTypeString>& AR_CString2
|
ZtCStringBase<TTypCh, TAlloc, TAllocSize, TTypeString>& AR_CString2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG_FAST_MOVE_OBJ_
|
#ifdef _DEBUG_FAST_MOVE_OBJ_
|
||||||
cout<<" ▶▶ __FastMoveObj(ZCString&, ZCString&) Start!"<<endl;
|
cout<<" ▶▶ ZftMoveFast(ZCString&, ZCString&) Start!"<<endl;
|
||||||
#endif //_DEBUG_FAST_MOVE_OBJ_
|
#endif //_DEBUG_FAST_MOVE_OBJ_
|
||||||
|
|
||||||
AR_CString1.Fetch(AR_CString2);
|
AR_CString1.Fetch(AR_CString2);
|
||||||
|
|
||||||
#ifdef _DEBUG_FAST_MOVE_OBJ_
|
#ifdef _DEBUG_FAST_MOVE_OBJ_
|
||||||
cout<<" ▶▶ __FastMoveObj(ZCString&, ZCString&) Close!"<<endl;
|
cout<<" ▶▶ ZftMoveFast(ZCString&, ZCString&) Close!"<<endl;
|
||||||
#endif //_DEBUG_FAST_MOVE_OBJ_
|
#endif //_DEBUG_FAST_MOVE_OBJ_
|
||||||
}/*
|
}/*
|
||||||
template //////////////////////////////////////////////////////////////////
|
template //////////////////////////////////////////////////////////////////
|
||||||
@ -8306,7 +8306,7 @@ namespace ZNsMain
|
|||||||
typename TTypCh , typename TAlloc,
|
typename TTypCh , typename TAlloc,
|
||||||
typename TAllocSize, typename TTypeString
|
typename TAllocSize, typename TTypeString
|
||||||
>
|
>
|
||||||
void __FastMoveObj //////////////////////////////////////////////////////*/
|
void ZftMoveFast ////////////////////////////////////////////////////////*/
|
||||||
|
|
||||||
}/*
|
}/*
|
||||||
namespace ZNsFunc*/
|
namespace ZNsFunc*/
|
||||||
|
Reference in New Issue
Block a user